Validation
Default validation
By default, elements with the required
attribute are validated.
Custom validation
To add custom validation, overwrite the default validation function.
To keep default validation and add additional validation, the internal function sv.validate
should be called from the overwritten version.
The example below will add validation for email inputs and keep default validation for required fields.
Example
This example will add email validation and display custom error messages.