Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

formName.fieldName.$error.ngRemoteValidate doesn't work #25

Open
junerockwell opened this issue Aug 7, 2015 · 0 comments
Open

formName.fieldName.$error.ngRemoteValidate doesn't work #25

junerockwell opened this issue Aug 7, 2015 · 0 comments

Comments

@junerockwell
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant