Hi team,
Do you know how to add validation to backend, i tried with getEditFrom in ModelAdmin and evene getCMSAction of class DataObject but no success. Thanks
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.
This might help:
http://doc.silverstripe.org/framework/en/topics/form-validation#validation-in-the-cms
Martine
Thanks for your help . I am a newbie in silvertripe so it would be nice if you can answer further like i had already the video module
class VideoAdmin extends ModelAdmin {
private static $managed_models = array('Video');
private static $url_segment = 'video';
private static $menu_title = 'Video';
}
HOw can i add getCMSValidator to validate the video title based on the following DataObject
class Video extends DataObject {
private static $db = array(
'VideoTitle' => 'Varchar(255)',
'VideoDescription' => 'Text',
'OwnerID' => 'Int'
);
}
Please see the below thread...
Fantastic, you are my life saver. Thank you very much