-
Notifications
You must be signed in to change notification settings - Fork 2
Validators
Lydia Gray edited this page Oct 15, 2020
·
2 revisions
A validator is used to determine whether an elements value meets a specified criteria. For example EmailElementValidator will check the value is a correct email format, and also that it's not null or empty (unless it's optional).
All validators are run on every page submission, so you need to be explicit in the validator if any element types are to be ignored.
Add a new .cs file inside the Validators folder, inheriting from IElementValidator. Implement the Validate method as required remembering to return true for any element types or circumstances which are not applicable to be checked.
Because all the Validators are run automatically, all you need to do is register the Validator in the AddValidators method.
- Availability
- Actions
- Behaviours
- Breadcrumbs
-
Conditions
- String Conditions
- Date Conditions
- Integer Conditions
- File Upload Conditions
- Custom validation
-
Elements
- AddAnother
- Address
- Button
- Booking
- Checkbox
- Date Input
- Date Picker
- Declaration
- Document Download
- Document Upload
- File Upload
- H1-H6
- HR
- Image
- Inline Alert
- Link
- Map
- Multiple File Upload
- OrderedList
- Organisation
- P
- Radio
- Select
- Street
- Summary
- Success page
- Textarea
- Textbox
- Time input
- Unordered List
- Uploaded files summary
- Warning
- EnabledFor
- Feedback form
- File uploads
- Form Schema
- Header
- Inbound Values
- Integrating with PowerAutomate/0365
- Lookup
- Page
- Payment & Payment calculations
- Preview data structure
- Render conditions
- Reusable elements
- Structure tests
- Success page
- Tag parsers
- Target mapping
- Validators