May help to know that even disabled (not enabled) fields need to be validated, but hidden fields are not validated.
So if you have a textbox that needs to be at least 10 characters long, if it's hidden it won't do a check on it.
The other tricky part though is that any empty value does not have validation rules applied. So if you make it required, it must have a value, if you don't and don't put any value then it doesn't check the rules.
So here's what you have to do:
- Create a custom validation rule that takes 3 parameters, Field1, Field2, Field2
- Set the Condition to
!String.IsNullOrWhiteSpace(Fields["{Field1}"].Value) || !String.IsNullOrWhiteSpace(Fields["{Field2}"].Value) || !String.IsNullOrWhiteSpace(Fields["{Field3}"].Value)
- Make sure you set "Requires Context" checked.
- On your form, set the 3 fields to NOT required (so you can put a null value)
- Create another 4th field, call it "VideoChecker" of type bool, make it required and set the default value to true. You can optionally wrap this with a div style="display:none" tag.
- Add the custom validation rule to this VideoChecker, and put in for the 3 fields the Field names of the 3 you want to check.
This worked for me, basically you're forcing a validation through the VideoChecker field.