0

I'm trying to get the form validation on -URL REMOVED- to trigger when I submit and it's not. I believe I have things setup correctly but am clearly missing something.

1
  • Are you trying to run actual validations with callbacks etc, or just prevent the form from being submitted with invalid fields/mark invalid fields red? Commented Aug 7, 2013 at 18:00

1 Answer 1

1

Looks like angularjs requires a model bound on an input to use the validation.

See http://jsfiddle.net/adamdbradley/Qdk5M/

Try removing ng-model="email", run, and you'll notice the validation no longer works.

<input type="email" id="inputEmail" placeholder="Email" ng-model="email" required>

vs

<input type="email" id="inputEmail" placeholder="Email"  required>
Sign up to request clarification or add additional context in comments.

2 Comments

I'm trying to use Angular's validation. My understanding is that in order to use Angular's and not the HTML5 validation I need the attribute novalidate
Interesting, I've never used that attribute on my angular forms, but I see that in the docs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.