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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Data Model Questions /

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

extended Validator and using get CMSValidator


Go to End


2 Posts   965 Views

Avatar
Anjana

Community Member, 1 Post

13 October 2013 at 7:49pm

I need to validate minimum price that can be included when saving. how do i create a extender validation for this using CMSValidator

Avatar
lx

Community Member, 83 Posts

13 October 2013 at 11:10pm

Hi anjana,

You could take a look at
Github.com/lx-berlin/NetefxValidator

The module includes rules for numeric validations.
For example:
$rule_Persons_Max = new NetefxValidatorRuleSMALLEREQUAL ("Persons", "Our flats are suitable for at most six persons", 'error', '6');

I didnt test it with the final 3.1 release. But i would expect that it runs without problems.
So if you are using 3.1 please let me know if the module has problems with 3.1

The documentation is available here: http://netefx.de/Silverstripe-NetefxValidator.php