Project documentation ##Why should I use it?
- Never trust your client. You should always validate every single input accquired from a user.
- Repeating lots of HTML markup takes a toll on any developer, it's just not fun anymore.
- Writing validation for every input and displaying a proper message takes time, and it's no fun either.
- Save yourself some time! If you're missing any validation, add it! Take a look at the existing validator and create your own, should take less than 5 minutes!
##How do I use it?
- See the link below for an example on how to use the controllers and inputs.
- Download the directory and place it in you project
- Make sure the FormController is included (with an autloader or require_once etc.)
- Take a look at the Settings class and tweak it to your needs.
- Create extra templates if you want for your inputs.
- You should now be able to save some time by not writing hundreds of lines of HTML and input validation!
##Integration tests avaiable Integration tests:
- Throws exception if two input fields have the same name
- No exception thrown if two input fields have different names
- Submitted form without data passes if there are no validators
- Submitted form without data fails if there are any required validators
- Submitted form with data succeeds if there are any required validators
- Submitted form shows error message if it is not valid
- UNsubmitted form does not show error message if it is not valid
See tests here: https://github.com/ehamrin/1dv608/blob/project/Project/tests/FormControllerTest.php
##Unit tests ###Comparator suite https://github.com/ehamrin/1dv608/blob/project/Project/tests/ComparatorTest.php
###Validation Suite https://github.com/ehamrin/1dv608/blob/project/Project/tests/ValidatorTest.php