CakePHP 3 Tutorial 14: Optional Requirements

Submitted by naidim on Tue, 10/04/2016 - 12:21

There may come a time when you have a form that has optional requirements. By that I mean that depending on a previous selection, future selections may become required, or not.

A simple method I've found to do this is with jQuery on the front end and no validation requirements on the back end. An example follows: