Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fail validation #42

Open
michaelnguyen2021 opened this issue May 22, 2015 · 1 comment
Open

fail validation #42

michaelnguyen2021 opened this issue May 22, 2015 · 1 comment

Comments

@michaelnguyen2021
Copy link

I follow your Demo 1 (address Book) and having a hard time to figure out why my code fails the validation as the customer_id is required.

My use case is create a customer first, save, edit customer , add new address which fail the validation as customer_id field is required for new address. How do I fix the issue ?

Updated: It turns out I must remove the 'customer_id' as required from Address model. Is there another solution ? I prefer to keep customer_id as 'required'

@luiszg
Copy link

luiszg commented Aug 15, 2017

I have the same Issue, other solution is delete:
$valid = Model::validateMultiple($modelsAddress) && $valid;

There are other solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants