7912 Posts in 1355 Topics by 930 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » Validation in DOM
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 379 Views |
-
Validation in DOM

17 November 2012 at 6:34am
SilverStripe 2.4.7
Hi
I'm looking for a way to validate the fields in my DOM popup. I need to, firstly, ensure that they have all been filled in. Next I need to make sure they are correct using Regular Expressions or something. I am ok with the regex but how do I go about applying validation to the fields?
Thanks
-
Re: Validation in DOM

20 November 2012 at 10:43pm Last edited: 21 November 2012 1:00am
I've been trying to implement what these posts talk about but it has no effect.
http://www.silverstripe.org/data-model-questions/show/6128
http://www.silverstripe.org/customising-the-cms/show/8236Even basic validation using the following does nothing.
public function getCMSValidator() {
return new RequiredFields(array('Title', 'Expires', 'Photo', 'Description', 'Weight', 'Price', 'Savings', 'Code'));
}When I try to add a new popup class I get this error
Class 'MyDataObjectManager_Popup' not found in /Applications/MAMP/htdocs/Gala/Gala/trunk/cms/sapphire/forms/ComplexTableField.php on line 600
I'm using
MyDOM->popupClass = 'MyDataObjectManager_Popup';
| 379 Views | ||
|
Page:
1
|
Go to Top |

