File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -108,9 +108,16 @@ public function validate()
108108
109109 foreach ($ requiredAttributes as $ attribute ) {
110110 if ($ this ->getFirstAttributeValue ($ attribute ) == null ) {
111- Log::error ('Required attribute missing ' , ['attribute ' => $ attribute , 'attributes ' => $ this ->getAttributes ()]);
112-
113- throw new MissingAttributeException ($ attribute );
111+ if ($ attribute === 'first_name ' ) {
112+ // Set "first_name" to a single space if it's missing
113+ $ this ->addAttributeValue ('first_name ' , '' );
114+ } else {
115+ Log::error ('Required attribute missing ' , [
116+ 'attribute ' => $ attribute ,
117+ 'attributes ' => $ this ->getAttributes ()
118+ ]);
119+ throw new MissingAttributeException ($ attribute );
120+ }
114121 }
115122 }
116123 }
You can’t perform that action at this time.
0 commit comments