Hi,
I have a contact form with name, email, and message fields, all set as required. If no data is entered in any of these fields I get the message "Please enter a value." for each of them.
I need to customize the message for each of them. Tried to do it through validation rules but it doesn't seem to be working. Tried adding a validation rule for a minimum length of 1 or 2 with a custom message but it is never triggered. Am I doing anything wrong? Any tips?
P.S.: I'm using the built-in form added through the admin portal which means I don't have any HTML/CSS/UI view code for that.
Thanks
Hi Leonardo,
This could be handled using the resource string: general.requiresvalue. Please note that this will update the value everywhere it is being used. For more info check out the documentation
general.requiresvalue
Cheers, Jeroen
Hi Jeroen, thanks for your comment.
So does that mean I cannot customize the error message per field and form?
Then why do we have validation rules (it doesn't seem to work) if not for these cases?
Thanks in advance.
Have you tried the minimum validation rule in combination with removing the required check?
We decided to change the message globally so this issue is fixed now. Thanks.
Please, sign in to be able to submit a new answer.