Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Only one constraint violation at the same time #7465

Closed

Description

@slavafomin

Hello there!

AngularJS form validation supports only one constraint violation at the same time for some reason.

For example, I have an input field with three constraints: number, max and pattern. Maximum allowed number is 30. Pattern is used to test for dot character inside of a number (to restrict input field to only float numbers). Now consider I've entered number 40. We should have two violations: max and pattern. But we have only one.

I've created a simple Demo to demonstrate the issue:
http://jsfiddle.net/slavafomin/23ET4/4/

I want to show my users a list of all constraint violations at the same time and I think it's a proper way to handle such things.

Please advise. Thank you!

Activity

  1. Narretz commented on May 14, 2014

    @Narretz
    Contributor

    There's a pull request for that: #7377

  2. caitp commented on May 14, 2014

    @caitp
    Contributor

    @Narretz I think we can close this as essentially a duplicate.

    @slavafomin Narretz is correct that forms are being refactored, and we're hoping to address this use case and generally improve things. That should ship fairly soon, you should pay attention to the issue Narretz linked, and maybe try it out and see if it suits your needs

  3. slavafomin commented on May 15, 2014

    @slavafomin
    Author

    @caitp Thanks for a feedback! It's really hard to find something among such big amount of issues, sorry for that = )

    What version of Angular will include these changes? I'm developing a module for latest stable ~1.2 branch and I hoped to provide such functionality. Is there a workaround I can use, or it's not possible to overcome from the library's client perspective?

    Thanks!

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions