- Add this file to application/libraries (or, if you are already extending the Validator class, add the contents there).
- Remove Validator alias from config/application.php in order to avoid conflicts.
"required_if_attribute" => "The :attribute field is required."to application/language/[language]/validation.php.
Define the rule using: