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

Only one constraint violation at the same time #7465

Closed
slavafomin opened this issue May 14, 2014 · 3 comments
Closed

Only one constraint violation at the same time #7465

slavafomin opened this issue May 14, 2014 · 3 comments

Comments

@slavafomin
Copy link

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!

@Narretz
Copy link
Contributor

Narretz commented May 14, 2014

There's a pull request for that: #7377

@caitp
Copy link
Contributor

caitp commented May 14, 2014

@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

@slavafomin
Copy link
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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants