Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ashford Borough Council Dev Team 25 posts 158 karma points
    Jun 18, 2015 @ 11:19
    Ashford Borough Council Dev Team
    0

    Umbraco 7 Forms - Regex expression containing double quotes causes problem

    I am having trouble with a commonly used Regex for validating email addresses. The expression is as follows;

    ^$|^(([^<>()[]\.,;:\s@\""]+(.[^<>()[]\.,;:\s@\""]+)*)|(\"".+\""))@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}])|(([a-zA-Z-0-9]+.)+[a-zA-Z]{2,}))$

    This expression works fine when validating a doc type property, but when used for validating a text field in a form created with Umbraco Forms 7 has the unusual effect of rendering just part of the expression (see image) and the validation of course doesn't fire. I don't know if it's due to the presence of double quotes in the expression, but any help in getting a workaround for this would be appreciated.

    enter image description here

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies