Formal: FOOP object validation
Formal is an object validator. It is aimed at form validation but it will be able to validate regular JS objects.
Include the following script inside your layout:
Don't forget to change the path accordingly.
To start validating your object, simply call:
Run the validation:
That's it! It will return a
- Actually declare validations with
- List of errors inside the object (