Skip to content
This repository was archived by the owner on Jul 16, 2023. It is now read-only.

Commit 746c52a

Browse files
committed
Allow subclass overriding of Validator
I want to be able to use Laravel's Validator's sometimes() feature with Ardent: ``` $v = Validator::make(...); $v->sometimes('reason', 'required|max:500', function($input) { return $input->games >= 100; }); ``` Allowing subclass overriding of Ardent::makeValidator() seems the easiest way.
1 parent 4d3b12d commit 746c52a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/LaravelBook/Ardent/Ardent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ public function validate(array $rules = array(), array $customMessages = array()
511511
$data = $this->getAttributes(); // the data under validation
512512

513513
// perform validation
514-
$validator = self::makeValidator($data, $rules, $customMessages);
514+
$validator = static::makeValidator($data, $rules, $customMessages);
515515
$success = $validator->passes();
516516

517517
if ($success) {

0 commit comments

Comments
 (0)