CakePHP-Proffer icon indicating copy to clipboard operation
CakePHP-Proffer copied to clipboard

Make Exception when field is not set optional

Open maartenvr98 opened this issue 3 years ago • 1 comments

I've made the Exception that is thrown when a field is empty in beforeSave optional. You can set the skipEmpty option to enable this.

The problem is that when I update anonther field (like name for example) in my entity the Proffer behavior is called and an exception is thrown.

maartenvr98 avatar May 12 '22 13:05 maartenvr98

Any chance you could add a unit test for this?

davidyell avatar May 19 '22 12:05 davidyell

@davidyell I've created a unit test for this. I hope I did it correctly because I don't write very much unit tests. If I did something wrong. Please tell me and I'll try to fix it.

maartenvr98 avatar Oct 28 '22 12:10 maartenvr98

Thanks

davidyell avatar Nov 16 '22 14:11 davidyell