Field Validation Not Working

How to fix a required field validation not working in ChronoForms.

Overview

The issue occurs when using an incorrect rule name like the field name instead of the keyword "required" in the validation rules.
Replace the field name with the word "required" in the validation rules box to properly enforce the field as mandatory.

Answered
ChronoForms v6
om omidhz 08 Apr, 2017
I have text field with the following setting:

Label: Date of Birth
Name: dob
ID: dob
Placeholder: mm/dd/yyyy
Mask: mm/dd/yyyy
Validation rules:
dob: Please enter your date of birth
.

When I enter date of birth in the form, and click on submit, I still get the validation message "Please enter your date of birth and the form does not submit.
I'm not sure what I'm doing wrong.

Thanks
Max_admin Max_admin 08 Apr, 2017
Answer
1 Likes
Hi,

The validation rules box will take this format:

rule:error message

"dob" is not a valid rule name, you can use "required" to make the field required.

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
om omidhz 08 Apr, 2017
Great. That did the trick.
This topic is locked and no more replies can be posted.