1
0
-1

I have a section early in my form that takes an email and password (as a security challenge) to give the user the option to send a "resume link" to their email address should they exit unexpectedly.  This email works just fine, however I want to make sure the email address and password fields are valid first before allowing the "send" button to be clicked.

I know of the "form.validate" function in the API, but i'm not sure how to access what's returned from this function to indicate that the fields are valid.  Thanks in advance for your help. 

    CommentAdd your comment...

    1 answer

    1.  
      2
      1
      0

      Form.validate returns a Validation object in the promise success handler.

      This object has two keys "valid" which is either true or false and "errors" which contains an array of error objects if not valid. These error objects contain the "id" and "msg" of the error.

      See code example below:

        CommentAdd your comment...