Jump to:

7939 Posts in 1543 Topics by 946 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » Validation in DOM

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1
Go to End
Author Topic: 563 Views
  • Stef87
    Community Member
    66 Posts

    Validation in DOM Link to this post

    SilverStripe 2.4.7


    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?


  • Stef87
    Community Member
    66 Posts

    Re: Validation in DOM Link to this post

    I've been trying to implement what these posts talk about but it has no effect.


    Even 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';

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.