-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Description
I know a lot of this can be done with classes, but it seems to me it would be a good improvement to have a standard set of validation constraints defined as standard on the fields in an action. For example, stating that a field is required, or read-only, or that it must have a certain max or min length.
From the example in the readme, for example, we might have:
{ "name": "orderNumber", "type": "hidden", "value": "42", "required": true, "readOnly": true },
{ "name": "productCode", "type": "text", "required": true, "minLength": 5, "maxLength": 50 },
{ "name": "quantity", "type": "number", "required": true, "min": 1, "max": 100 }Clients can then have a much better understanding of how the fields need to work, which can give a much better user experience.
The set defined in HAL Forms would seem to be a decent starting point, though the way that options works there is quite complicated to handle.
Cheers
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels