Skip to content

How to validate a change operation from an input element #3

Description

@ruimgoncalves

Hi

I have a model fetched from a database query, this model has a observation field that has a validation rule of min_length : 5
I attached this database field to an input element.

<input value="{{_page.row.observation}}" />

When I edit this input text and enter a value that fails validation, an error is thrown in the server, and the input value is "rolled back".

Is there a way to handle this error on the client side, maybe set the invalid property of the input to the error message thrown by the server?

Best regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions