Is there a way we can do passedValidation or after() feature ?
#784
Unanswered
hvsharma63
asked this question in
Q&A
Replies: 1 comment
-
|
You can use use Illuminate\Validation\Validator;
use Spatie\LaravelData\Data;
class SongData extends Data
{
// ...
public static function withValidator(Validator $validator): void
{
// This will run after the validator has checked the rules.
$validator->after(function (Validator $validator) {
if ($validator->errors()->isEmpty()) {
// Extra Validation
}
});
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm looking for a way to implement Performing Additional Validation and Preparing Input for Validation using laravel-data.
I checked the documentation but couldn't find anything.
Is there a way?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions