Jump to:

1970 Posts in 1275 Topics by 607 members

Form Questions

SilverStripe Forums » Form Questions » Custom validator error message

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1705 Views
  • katja
    Avatar
    Community Member
    46 Posts

    Custom validator error message Link to this post

    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

  • FungshuiElephant
    Avatar
    Community Member
    57 Posts

    Re: Custom validator error message Link to this post

    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);

    1705 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.