Skip to content

Required not working after emptying the field #41

@1zerro1

Description

@1zerro1

Version 8.5.2.

Bug description : Required wont raise if the field is empty, but previously had a value.

Reason why : After deleting all text, the value = '<p></p>'

To reproduce
Simply put a MudRichTextEditor in a form

<MudForm @ref="form">       
  <MudExRichTextEdit                              
  Height="300"                        
  EnableResize="false"
  Required="true"
  Immediate="true"
/>
[...]

Step 1 (checking requires work): Load the page, then validate the form (form.validate();) , field won’t be valid because the value = null.
step 2: write some text in the MudExRichTextEdit
step 3: erase all the text from MudExRichTextEdit
Step 4: validate the form.

Required does not triggers

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