| @@ -1,9 +1,9 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | namespace FluentForm\App\Modules\Form\Settings\Validator; |
| 4 | 4 | |
| 5 | -use FluentValidator\Validator as FluentValidator; | |
| 5 | +use FluentForm\Framework\Validator\Validator; | |
| 6 | 6 | |
| 7 | 7 | class Pdfs |
| 8 | 8 | { |
| 9 | 9 | /** |
| @@ -18,9 +18,9 @@ | ||
| 18 | 18 | // Prepare the validation rules & messages. |
| 19 | 19 | list($rules, $messages) = static::validations(); |
| 20 | 20 | |
| 21 | 21 | // Make validator instance. |
| 22 | - $validator = FluentValidator::make($data, $rules, $messages); | |
| 22 | + $validator = wpFluentForm('validator')->make($data, $rules, $messages); | |
| 23 | 23 | |
| 24 | 24 | // Add conditional validations if there's any. |
| 25 | 25 | $validator = static::conditionalValidations($validator); |
| 26 | 26 | |
| @@ -48,9 +48,9 @@ | ||
| 48 | 48 | [ |
| 49 | 49 | 'name.required' => 'The Name field is required.', |
| 50 | 50 | 'template.required' => 'The Template field is required.', |
| 51 | 51 | 'filename.required' => 'The Filename field is required.', |
| 52 | - ] | |
| 52 | + ], | |
| 53 | 53 | ]; |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | /** |
| @@ -55,13 +55,13 @@ | ||
| 55 | 55 | |
| 56 | 56 | /** |
| 57 | 57 | * Add conditional validations to the validator. |
| 58 | 58 | * |
| 59 | - * @param FluentValidator $validator | |
| 59 | + * @param \FluentForm\Framework\Validator\Validator $validator | |
| 60 | 60 | * |
| 61 | - * @return FluentValidator | |
| 61 | + * @return \FluentForm\Framework\Validator\Validator | |
| 62 | 62 | */ |
| 63 | - public static function conditionalValidations(FluentValidator $validator) | |
| 63 | + public static function conditionalValidations(Validator $validator) | |
| 64 | 64 | { |
| 65 | 65 | return $validator; |
| 66 | 66 | } |
| 67 | 67 | } |