SRS: Create form constructor with validations of input fields. Check on GitPages here
- create form constructor
- all layout (except container) is planned to be created with Javascript
- an object provided to constructor can contain different inputs (name, surname, boolean data(married, has children and so on)) and buttons (with callbacks for actions)
- while iterating through the object validate type of fields and buttons
- each input must correspond to the aim of the field (type="text" for simple fields, radio - for boolean values)
- user's input must be validated and if valid, data should be changed in runtime
- for now 2 buttons:
ok - updates data
cancel - must clear all the inputs - mandatory fields marked with red * (had to mutate object to avoid * in property and to save all validation checks)
- mandatory fields are highlighted if empty
- password and password confirmation validation
- ok button checks following before sending request (for now just into console without JSON formation):
*if mandatory fields are not empty
*all validators are passed - cancel button restores all input fields to the moment of object creation (including radio buttons) and clears notifications
- multiple form support due to usage of closures and absence of id/class identifications