I have a simple form that interacts with my database, which is working fine. Now, however, I need to make it such that one of the fields is not required. I opened up the model and removed the field from the required array, but on submitting the form, that field is not sent to the database. So obviously a rule must exist for every field, even if that field is not to be verified.
So I added a new line to the rules array that said
But on submitting the form, I get an exception. What am I doing wrong here?