Validation rules magic #567
Scarecrow0w
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Example with default
rule_inferrers
settings:The problem - when you're using the
#[Rule]
attribute, your validation rules returned bydd(UsersData::getValidationRules(['data' => []));
will be:
'required|array|present'
.But if we use
#[Present]
attribute:the result of
getValidationRules()
will be:'array|present'
.So, if it's a bug - please fix it.
If it's a magic feature, please, mention it in docs
Beta Was this translation helpful? Give feedback.
All reactions