Skip to content

[BUG] Fix validation classes #59

@albx

Description

@albx

Describe the bug

Validation classes must match the behavior described in the official documentation.

To Reproduce

The class is-invalid now has been set on ValidationMessage component (see

protected RenderFragment? RenderValidationMessage()
).

Expected behavior

If the content of a field is invalid, the field itself must have a is-invalid class and the ValidationMessage component must have a just-validate-error-label. If the field is valid it must have a just-validate-success-field css class.

Additional context

In order to implement this behavior EditContext cascading parameter could be used, implementing a custom FieldCssClassProvider and set this implementation via the SetFieldCssClassProvider method.

The RenderValidationMessage method can be moved from BitInputFieldBase class to BitFormComponentBase class.

Here some references:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcomponentsIssues related to the components

    Projects

    Status

    Todo

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions