Posts tagged as:

form validation

CodeIgniter conditional required fields

This is a quick tip if you’re looking for a “required_if” rule in CodeIgniter. Basically the rule is as follows: Make form field-A required if form field-B is filled in. The most common case scenario is changing a password, where the original password is required first, but is conditional only if a new password is entered.

{ 2 comments }

Click to continue...