How to use the new validation backend introduced in V3? #347
Unanswered
francoism90
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I haven't used LiveWire that much so I'm afraid I cannot help you with this. Since you're working with a root data payload, all validation rules will always be generated for all properties of the object. Only when nesting other data objects which are optional then we'll stop generating rules based upon the given payload. So my guess is that Optional will still be required in your case. As a rule of thumb, though the automatic generation of validation rules of this package is really nice. It is sometimes a lot easier in cases like this one to just manually write them out 😄 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is the user dataobject:
To fill the rules payload, I need to inject the
rules
like this:On every (form) submit, it will use the Livewire's dataobject to populate the
$payload
. I don't know any other workarounds, so please let me know if they are.Questions:
sometimes
to the rules, to exclude non existing data entries (e.g.password
). Do I need to use a different set of rules?Optional
?Many thanks!
Beta Was this translation helpful? Give feedback.
All reactions