Check for validity of data input by user.
A mini-project on validation of data which the user enters.
This project involves the creation of E-mail account of a user and checks in each step whether the input provided by the user is valid or not.
For more knowledge on input validation, please refer to wiki page. https://github.com/malverick/Data-Validation/wiki
The project is implemented in two ways:
-
A stand-alone independent C program
-
A library called
data_validate
is created in which the prototype is defined for each and every function and the user just need to import the library in his main program and work accordingly. There is a filedata_validate.h
which contains all the function decalrations(it's return type and formal parameters) and global declarations if any. Another filedata_validate.c
which contains definitions of all the functions declared indata_validate.h
. Finally, there ismain.c
which is for testing the header file/library created.
To run the project -
- Clone the repository or download ZIP.
1. Open terminal
2. `git clone https://github.com/malverick/Data-Validation.git`
3. `cd Data-Validation`
(Now you are in the project directory)
1. Click on `Clone or Download` option at extreme right of header and `Download ZIP` from there.
2. Open terminal
3. `cd /dir/containing/downloaded/zip`
4. `unzip Data-Validation-master.zip`
5. `cd Data-Validation-master`
(Now you are in the project directory)
-
If you want to test the stand-alone C program then,
cd Stand-alone\ C\ program/
gcc main.c
./a.out
-
If you want to test the header file then,
cd Library/
gcc data_validate.c main.c
./a.out