Welcome Guest, Not a member yet? Register   Sign In
model validationRules for nullable fields?

Is there a way of setting up model validation (for example "integer" or "numeric") for fields that are not required and also can be null?
I'm aware of the "if_exist" (doesn't allow null values) and "permit_empty" (permits also some non-null invalid values) rules, and also I figured "callback_" probably can't be used for this (unless I recreate all needed validation rules with callbacks that would allow null, for example callback_nullableInteger, callback_nullableNumeric, callback_nullableAlphaNumeric etc)

Messages In This Thread
model validationRules for nullable fields? - by lukmim - 01-14-2022, 08:41 AM

Theme © iAndrew 2016 - Forum software by © MyBB