-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
I'm using this to validate an email field remotely.
Looking at the console, the HTTP.GET works exactly as it should and returns {"isValid":bool,"value":"[email protected]"} but my message doesn't show up if isValid is false.
<span ng-show="userRegistrationForm.email_addr.$error.ngRemoteValidate">
This email address already exists.
</span>
And basically, this is what the email field looks like:
<div class="item item-input">
<span class="input-div">Email</span>
<input type="email"
name="email_addr"
ng-model="userAccountData.email"
ng-pattern="/^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/"
ng-remote-validate="http://somewhere.com/api/check_email_existence"
ng-remote-throttle="400"
ng-remote-method="GET"
required>
<span ng-show="userRegistrationForm.email_addr.$error.ngRemoteValidate">
This email address already exists.
</span>
</div>
Maybe I don't know how to use formName.fieldName.$error.ngRemoteValidate so maybe someone can tell me?
Also, I'm not sure about this but I decided to try and output value of formName.fieldName.$error.ngRemoteValidate doesn't work like this:
<span ng-show="userRegistrationForm.email_addr.$error.ngRemoteValidate">
{{userRegistrationForm.email_addr.$error.ngRemoteValidate}}
This email address already exists.
</span>
...and using FireBug (in Firefox), it doesn't show any value.
Metadata
Metadata
Assignees
Labels
No labels