** See the demo for a practical example on how to use this component **
This component exposes the following main functions:
- ValidateForm (client and server) - validate a struct according to your defined Schema
- Form_SetValidity (client) - automatically set the 'Valid' and the 'ValidationMessage' properties on your input widgets from the given ValidationResult (provided by the ValidateForm action)
- Field_GetValidity (client) - manually check the validity of a given input (alternative to Form_SetValidity)
To construct your schema I recommend using the builder pattern (see demo) with the following helper functions (server):
- Schema_Create - init an empty schema with options
- Schema_AddField - add a field and rules to a schema
- Constraint_Build - helper to build a field constraint
- Constraint_Build_* - various helpers to build specific constraints (to make your code cleaner)