Skip to content

Support for validation concerns on action fields #102

@sazzer

Description

@sazzer

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions