How to modify Default DocType Error Message that comes when regex validation is false.
I use regex validation to limit user input character (max 200) in document type. its works fine but problem is if character goes more than 200 its gives error message which is not descriptive or not much meaning full for other (example editor, publisher) . as a developer i can understand what was problem but other may not be able to identify what's a problem because error message is not decriptive.
"Error in Red Color" it says " Description at Product is not in a correct format";
how to replace that error message with custom error message for example "Maximum characters 200 are allowed in Description".?
here is regex validation code to limit character max 200
I don't believe there's any way to use a custom message here (maybe with a custom datatype?).
A slight workaround might be to use the Description field to explain the requirements, for example: "Enter your description here, must be less than 200 characters" or something along those lines. I do the same when asking for a URL, I add to the Description "Be sure to include http://", since the regex error doesn't really explain it.
On a side note, I'm not sure how well that regex will work on a Rich Text field, does it count the HTML as characters also?
How to modify Default DocType Error Message that comes when regex validation is false.
I use regex validation to limit user input character (max 200) in document type. its works fine but problem is if character goes more than 200 its gives error message which is not descriptive or not much meaning full for other (example editor, publisher) . as a developer i can understand what was problem but other may not be able to identify what's a problem because error message is not decriptive.
"Error in Red Color" it says " Description at Product is not in a correct format";
how to replace that error message with custom error message for example "Maximum characters 200 are allowed in Description".?
here is regex validation code to limit character max 200
.thanks in advance
Jivan
Hi Jivan,
I don't believe there's any way to use a custom message here (maybe with a custom datatype?).
A slight workaround might be to use the Description field to explain the requirements, for example: "Enter your description here, must be less than 200 characters" or something along those lines. I do the same when asking for a URL, I add to the Description "Be sure to include http://", since the regex error doesn't really explain it.
On a side note, I'm not sure how well that regex will work on a Rich Text field, does it count the HTML as characters also?
-Tom
thanks Tom,
that regex will count everything including white space.
is working on a reply...