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:

Archive /

Our old forums are still available as a read-only archive.

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

Custom Form Validation (in CMS)

Go to End



Community Member, 13 Posts

8 November 2008 at 12:10am

Edited: 08/11/2008 12:11am

I'm looking to make a comparison between two fields that exist on a form lets say they are called elementA and elementB; what i need is for a validator to check whether elementA < elementB and return false if it is with a nice pretty error.

I modified ConfirmPasswordField and got the js errors working but the message didn't disappear when it validated and the second field didn't save in the database.

the code used to instigate the attached file is as follows

new SlotQuotaField("Slots")

Thanks in advance