| @@ 630-637 (lines=8) @@ | ||
| 627 | * |
|
| 628 | * @return $this |
|
| 629 | */ |
|
| 630 | public function rules($rules = null, $messages = []): self |
|
| 631 | { |
|
| 632 | $this->rules = $this->mergeRules($rules, $this->rules); |
|
| 633 | ||
| 634 | $this->setValidationMessages('default', $messages); |
|
| 635 | ||
| 636 | return $this; |
|
| 637 | } |
|
| 638 | ||
| 639 | /** |
|
| 640 | * Set the update validation rules for the field. |
|
| @@ 647-654 (lines=8) @@ | ||
| 644 | * |
|
| 645 | * @return $this |
|
| 646 | */ |
|
| 647 | public function updateRules($rules = null, $messages = []): self |
|
| 648 | { |
|
| 649 | $this->updateRules = $this->mergeRules($rules, $this->updateRules); |
|
| 650 | ||
| 651 | $this->setValidationMessages('update', $messages); |
|
| 652 | ||
| 653 | return $this; |
|
| 654 | } |
|
| 655 | ||
| 656 | /** |
|
| 657 | * Set the creation validation rules for the field. |
|