Skip to content

when use multiple validations show multiple errors #563

Closed
@luisenriquegomesportugal

Description

Hello, I'm using your component and I realized that when I use multiple validations in the same field it shows several errors on the page, I'll attach photos from the screen for you to understand.

I'm using this scheme:

oSchema  : 
{
  groups : 
  [
    {
      legend : 'Teste',
      fields : 
      [
        {
          type          : "cleave",
          label         : "Data de nascimento",
          model         : "date",
          pattern       : /^\d{2}\/\d{2}\/\d{4}?/,
          required      : true,
          validator     : ["required", "regexp", "number"],
          cleaveOptions : 
          {
            date: true,
            datePattern: ['d', 'm', 'Y'],
            delimiter: '/'
          }
        }
      ]
    }
  ]
}

however, using this schema, it generates this output:
image

I would like you to look at this problem, or guide me to the correct form, if there is one.

I imagine that it is a for in errors, and that it could be changed to a first so it showed only the first error, and when that error was corrected then it showed the other error, and so on.

in addition, the component is very good, very versatile, it helped me a lot, I will always use it, congratulations.

thank you so much.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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