Hello,
I was wondering if there is an easy way to override the error message returned by the validator. I looked at Sapphire/Validator.php, but I can't figure it out myself..
Cheers
Katja
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
Hello,
I was wondering if there is an easy way to override the error message returned by the validator. I looked at Sapphire/Validator.php, but I can't figure it out myself..
Cheers
Katja
And old post, but I thought I'd reply any way so it's there for searchers..
FormFields have a setCustomValidationMessage function which should propably work:
$myField->setCustomValidationMessage($msg);