laravel-model-validation icon indicating copy to clipboard operation
laravel-model-validation copied to clipboard

some function to bypass validation

Open vheins opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe. I need to define validation rule on every model but some time i need to by pass that

Describe the solution you'd like Maybe you can add some chaining function to skip validation and use like this

//this is current usage with validation rule enabled
MyModel::create(['name'=>'jhon doe');

//code if validation ignored / skip
MyModel::skipValidation()->create(['name'=>'jhon doe');

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context i try to make pull request but my knowledge its limited caus its using boot() on model i dont know to parsing variable to boot() method

vheins avatar Oct 11 '23 05:10 vheins

Thanks for raising @vheins. It would be a good addition to the package if possible. I will have a look.

theriddleofenigma avatar Oct 11 '23 08:10 theriddleofenigma

thank you @theriddleofenigma hope you can help this

vheins avatar Oct 11 '23 08:10 vheins