-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
There is no way to set validator options in the backend. however, there is a way to do it in > the code. Lets say you have a setting called "config_path" that you want to validate in a
certain way. In /path/to/project/lib/form/doctrine/csSettingsPlugin/csSettingForm.class.php > you can declare a public method like this:public function getConfigPathSettingValidator() { return new sfValidatorString(array('max_length' => 100, 'required' => true')); }Or whatever validation you would like. This allows you to customize validation for certain > > settings."
Is that helpful?
Yes, it is good that way but I served in this case. I have type settings "upload"and I need to define "mime_types" and "validated_file_class" different options for each setting. I think I'll add one more field to the model: "validator_options"
Metadata
Metadata
Assignees
Labels
No labels