| @@ 665-672 (lines=8) @@ | ||
| 662 | * |
|
| 663 | * @return $this |
|
| 664 | */ |
|
| 665 | public function rules($rules = null, $messages = []): self |
|
| 666 | { |
|
| 667 | $this->rules = $this->mergeRules($rules, $this->rules); |
|
| 668 | ||
| 669 | $this->setValidationMessages('default', $messages); |
|
| 670 | ||
| 671 | return $this; |
|
| 672 | } |
|
| 673 | ||
| 674 | /** |
|
| 675 | * Set the update validation rules for the field. |
|
| @@ 682-689 (lines=8) @@ | ||
| 679 | * |
|
| 680 | * @return $this |
|
| 681 | */ |
|
| 682 | public function updateRules($rules = null, $messages = []): self |
|
| 683 | { |
|
| 684 | $this->updateRules = $this->mergeRules($rules, $this->updateRules); |
|
| 685 | ||
| 686 | $this->setValidationMessages('update', $messages); |
|
| 687 | ||
| 688 | return $this; |
|
| 689 | } |
|
| 690 | ||
| 691 | /** |
|
| 692 | * Set the creation validation rules for the field. |
|