-
Notifications
You must be signed in to change notification settings - Fork 9
Add validation to modules fields #56
Copy link
Copy link
Closed
Description
Related to: commitdev/zero#226
Which one of these formats should we pick for passing validation from the modules? leaning towards option 1.
// option1
- field: productionHostRoot
label: Production Root Host Name (e.g. mydomain.com) - this must be the root of the chosen domain, not a subdomain.
fieldValidation:
- type: regex
- value: '^\d{3}-\d{2}-\d{4}$'
- field: productionHostRoot
label: Production Root Host Name (e.g. mydomain.com) - this must be the root of the chosen domain, not a subdomain.
fieldValidation:
- type: function
- value: function_name_goes_here
VS
// option 2
- field: productionHostRoot
label: Production Root Host Name (e.g. mydomain.com) - this must be the root of the chosen domain, not a subdomain.
pattern: regex_goes_here
- field: productionHostRoot
label: Production Root Host Name (e.g. mydomain.com) - this must be the root of the chosen domain, not a subdomain.
validationFunction: function_name_goes_here
cc @davidcheung cc @bmonkman
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels