function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Gaurav Agnihotri 10Gaurav Agnihotri 10 

Error Message next to the field

Hello, 
I have a requirement where i need to add an error message next to the website field if the submitted value is not valid. Also, I have a logic to validate this field. I do not want to use addMessage.

Any suggestions?
Thota Rakesh 1Thota Rakesh 1
Hi Gaurav Agnihotri 10,


When you create a validation rule you have the option of displaying the error message at the top of the page or next to your field.  If you have your rule set up to display next to your field (and that field is on your page) it should display where you want it to.

A few other ways that you could achieve this if the validation rule isn't displaying the error against the field.

Couple of blog posts explaining the options at:

1. http://bobbuzzard.blogspot.com/2011/04/field-level-error-messages-with.html

2. http://bobbuzzard.blogspot.com/2011/04/field-level-error-messages-with_29.html


Kindly mark it as solved if it helps you,


Best Regards,
Rakesh.T