Welcome Guest, Not a member yet? Register   Sign In
Create Model with command line
#6

(09-25-2022, 02:20 PM)kenjis Wrote: If $cleanValidationRules is true, the validation rules for the field that is not contained in the passed data will be removed before validation.

But it does not seems to work if you don't call validate() by yourself.
If you call insert() or update() or save(), the $cleanValidationRules value will be changed automatically.
I'm not sure this is a bug or not.

Anyway, it is a feature in Model, not in the Validation library.
Yes, i think it is a bug too. I tried and get the same result also. There would be no use to putĀ $cleanValidationRules in model if it gets replaced automatically on calling model insert/update/save. The only way it would works if we capture the validation error on validate() then stop executing next line.
Is there any other workaround?
Reply


Messages In This Thread
RE: Create Model with command line - by InsiteFX - 09-25-2022, 12:37 AM
RE: Create Model with command line - by kenjis - 09-25-2022, 01:08 AM
RE: Create Model with command line - by kenjis - 09-25-2022, 02:20 PM
RE: Create Model with command line - by [email protected] - 09-25-2022, 08:23 PM
RE: Create Model with command line - by kenjis - 09-25-2022, 10:40 PM
RE: Create Model with command line - by kenjis - 09-26-2022, 12:12 AM
RE: Create Model with command line - by InsiteFX - 09-26-2022, 01:01 AM



Theme © iAndrew 2016 - Forum software by © MyBB