You can clone with
HTTPS or Subversion.
Create textfield test.
Create new textfield test1. Mark it required & set it to hide by default.
Add custom rule to test1: Show This Field When test is Value test
Try submitting the form with field test set to check. The form won't validate. Now set it to test. Field test1 appears correctly. And if it is unset, the form won't pass validation. Setting test1 validates the form.
Any progress on this issue which has reared its ugly head with me. I'm almost prepared to put up with no php validation at this point,.
No progress on it from me. Happy to review patches if you want to give it a go. If you want to disable PHP validation you may as well make the field not required and just put (required) as a label text or something.
If I'll try patching this at some point where should I start my searches for PHP side of validation. As I mentioned in #116 I couldn't find the place then...
The PHP side of validation uses the normal SilverStripe API. See UserDefinedForm::getRequiredFields(). One way would be to not use the core SilverStripe validate() method on form fields and manually invoke validate methods in the submit form method.
Since I just failed so spectacularly on identifying a jquery validation error, ironically because of this, I was wondering if anybody had any more to offer. I cant see a way round it other than to not require the conditional fields and the client is demanding that they are required. A problem and perhaps time for another custom form!
@tazzydemon What I would aim to do is ticking that required box in the cms didn't actually set the PHP required fields and validation is controlled after the rules are parsed in the form handler. I'm keen to build this when I can get around to funding it, if you want to tackle it PR's welcome.