How rules works? |
From the docs,
Quote:if_exists: If this rule is present, validation will check the field only when the field key exists in the data to validate. More explanation: Validation will only check the field when the field key is present in the request data to validate. For example, you set the rule on a field like so: PHP Code: $rule = ['username' => "if_exists|numeric"]; Quote:permit_empty: Allows the field to receive an empty array, empty string, null or false. More explanation: Validation will allow a field to accept an empty value, irrespective of the associated rules. For example, you set the rule on a field like so: PHP Code: $rule = ['username' => "permit_empty|numeric"]; |
Welcome Guest, Not a member yet? Register Sign In |