My knowledge of regular expression is very weak. I am needing help building the regular expression and try to display two notifications if user leaves title text box field empty. In my original project there is more than one text box for currency, description textarea, chekcbox, etc. But I don’t want to make this example extensive so I am using only one text box.
Both notification appear if text box field is left empty but the problem is once the correct input is placed it still shows notification number two: “* Descriptive title for your post”. Why is that?
JS Expressions
"required": { // Add your regex rules here, you can take telephone as an example
"regex": "none",
"alertText": "* This is required",
"alertTextCheckboxMultiple": "* Please select an option",
"alertTextCheckboxe": "* This checkbox is required",
"alertTextDateRange": "* Both date range fields are required"
},
"title": {
"regex": "none",
"alertText": "* Descriptive title for your post"
},
HTML
input type="text" id="ValidField" class="validate[required,custom[title]] text-input" size="60" autocomplete="off" value=""/>
Result after correct input has been entered:

Looking at your markup, it appears that the
regexis currently set to match the wordnonewhen it validates the title.The Customizations section at the Validation plugin webpage explains that this value is a
regexpattern per your forms Title requirements.Although that
regexexample allows letters only, a differentregexpattern can be used to include numbers, symbols, etc. per your forms requirements.This online tool may be useful in testing to create the right regex.
For example, a
regexfor the Title to make sure it has something would be:/^(\S+)/This
regexwould allow the Title to have letters, space, and numbers:/^[a-zA-Z0-9\ \']+$/