Forums

Forums / General Discussions / Empty Space Validation

Empty Space Validation

2 posts, 1 answered
  1. Syed Hammad Aleem
    Syed Hammad Aleem avatar
    5 posts
    Registered:
    25 Nov 2021
    02 Dec 2021
    Link to this post
    Form is submitting even with empty space, which is causing errors on submission. If we just enter empty spaces it does not give any validation even though we have set the field as required. Validation only works if we submit writing nothing in field.
  2. Brady Ward
    Brady Ward avatar
    92 posts
    Registered:
    19 Aug 2021
    Answered
    02 Dec 2021 in reply to Syed Hammad Aleem
    Link to this post
    Hello Syed,

    By default, this is the behavior of the input validation. A whitespace character is still considered input, though I can see why this would be unwanted.

    If you are looking to block anyone from submitting only whitespace, you can edit the field in question. Go to the Validation tab, set the Regex Validation field to Custom and enter the following regex: 

    .*\S.*

    This will prevent a submission from being sent to the CRM with only whitespace.

    Let me know if that helps,

    Brady
    TPC Web Developer
2 posts, 1 answered