Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

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.

Data Model Questions /

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

Making CMS-Fields required


Go to End


17 Posts   9222 Views

Avatar
muskie9

Community Member, 24 Posts

14 February 2014 at 12:11pm

I've been digging into this a bit more and am wondering if the getCMSValidator can handle complex rules or if it's just checking for a value. I looked through the validator class and it looks like it's just looking for any value. I know the EmailField has additional validation so I'll poke around there as a starting point to additional validation on a form field, but wanted to raise the question. I know in things like the CsvBulkLoader you can pass to functions for verification/object requests. Probably unrelated but would be cool to be able to have array('FieldName' => '->fieldValidationCheck') to set up perimeters.

Go to Top