Skip to main content

Search

Validating email address

Comments

2 comments

  • Vladyslav Noskov

    Hello Heikki Salminen

     

    If I understand you right you want validate value in extAccountName field that calculated by concatenating a few fields together.

     

    To do this you can try follow next (in my example I used Edit Form):

     

    1. Add Calculated expression for field extAccountName via Behaviour Tab of skybow Rich Forms:

    Use 'Assigment expression' with next code:

    "ext-" + [[extUserFirstName]] + "." + [[extUserName]] + "@almamedia.fi"

    2. Add Validation expression for field extAccountName via Behaviour Tab of skybow Rich Forms:

    Use 'Function Code expression' with next code in it:

    var email = [[extAccountName]];
    return (/^\w+([\.\-]?\w+)*@\w+([\.\-]?\w+)*(\.\w{2,3})+$/).test(email);

    3. Set Validation Text for field extAccountName via Behaviour Tab of skybow Rich Forms (it will show in case validation failed):

     

    And here is screenshot how it looks on runtime after you try to Save form with invalid Account Name:

    Hope it can help.

     

    Best regards

    Vladyslav Noskov

    0
  • HeikkiS

    Hi

     

    Thanks, the solution worked smoothly.

     

    Br, Heikki

    0

Please sign in to leave a comment.