No spaces field validation

validate a form field to prevent spaces.

Overview

The standard CF regex validation for spaces was not working as expected.
Use a custom validation function or adjust the regex pattern to correctly detect spaces in the field value.

Answered
ChronoForms v7
wa walterbz 12 Sep, 2023
Hi all,
I'm trying to add a validation that checks if there are white spaces in field.
I tried with regex \S but it does not work
I tried to add a space in the regex field "does not contain" but also does not work. It works with other string but not with spaces.
Any idea?
Thanks
Max_admin Max_admin 28 Sep, 2023
Answer
did you try a custom function and return an error if the field value includes a space ?

it's also possible with Regex
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.