uiValidate docs
joseym opened this issue · 7 comments
Is the current method for the uiValidate directive documented still valid?
I was unable to get it to work. However after looking at the directive and playing with it I was able to get it work here: http://jsfiddle.net/joseym/Zkyvz/
I may just be ignorant
Yeah, the demo site will have to be updated.
The doc block at the top of the directive is up to date though.
You now have to make all expressions strings and use $value.
Also, ui-validate-refresh allows you to do validation that corresponds with other models. This way if another model is changed, the field will immediately be invalidated (rather than the next time you edit it).
The only thing is that a note will have to be added that says you should not put mirrored validation on 2 related fields because if an input becomes invalid, it's model stops changing. So lets say you have a 'confirm-password' validation rule on both password inputs? They will essentially never become valid because you'd have to cause both models to update simultaneously.
If you want to be awesome you can prepare a PR for v0.4.0 for me 😄
That's the conclusion I came to. There's already a PR open for v.0.4.0 which contains the uiRoute directive docs and the scrollTo bug in firefox but I'd be glad to update the uiValidate docs as well.
I was unaware of ui-validate-refresh, I tinkered with my fiddle to show some colleagues why angular is A+ and one asked why js validation is better than html5 validation. I gave a list of answers and one of them was validating off of another model but then I was unable to make it reflect immediately.
I still won, tho. Totally pwn'd him.
You use the directive for any validation that html5 doesn't already
covered. And yes the refresh feature is specifically for tying two separate
models and inputs together.
On Feb 12, 2013 6:53 AM, "Josey Morton" notifications@github.com wrote:
That's the conclusion I came to. There's already a PR open for v.0.4.0
which contains the uiRoute directive docs and the scrollTo bug in firefox
but I'd be glad to update the uiValidate docs as well.I was unaware of ui-validate-refresh, I tinkered with my fiddle to show
some colleagues why angular is A+ and one asked why js validation is better
than html5 validation. I gave a list of answers and one of them was
validating off of another model but then I was unable to make it reflect
immediately.I still won, tho. Totally pwn'd him.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/44#issuecomment-13435761.
Can you open a new pull request for just the Validate docs?
On Feb 12, 2013 6:53 AM, "Josey Morton" notifications@github.com wrote:
That's the conclusion I came to. There's already a PR open for v.0.4.0
which contains the uiRoute directive docs and the scrollTo bug in firefox
but I'd be glad to update the uiValidate docs as well.I was unaware of ui-validate-refresh, I tinkered with my fiddle to show
some colleagues why angular is A+ and one asked why js validation is better
than html5 validation. I gave a list of answers and one of them was
validating off of another model but then I was unable to make it reflect
immediately.I still won, tho. Totally pwn'd him.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/44#issuecomment-13435761.
probably - I think i have to do it on a different branch or something.
When I try and open a PR it says I already have one open. I'll try shortly.
Also, I think that you mean ui-validate-watch rather than ui-validate-refresh: validate.js#L48