| @@ 621-628 (lines=8) @@ | ||
| 618 | * |
|
| 619 | * @return $this |
|
| 620 | */ |
|
| 621 | public function rules($rules = null, $messages = []): self |
|
| 622 | { |
|
| 623 | $this->rules = $this->mergeRules($rules, $this->rules); |
|
| 624 | ||
| 625 | $this->setValidationMessages('default', $messages); |
|
| 626 | ||
| 627 | return $this; |
|
| 628 | } |
|
| 629 | ||
| 630 | /** |
|
| 631 | * Set the update validation rules for the field. |
|
| @@ 638-645 (lines=8) @@ | ||
| 635 | * |
|
| 636 | * @return $this |
|
| 637 | */ |
|
| 638 | public function updateRules($rules = null, $messages = []): self |
|
| 639 | { |
|
| 640 | $this->updateRules = $this->mergeRules($rules, $this->updateRules); |
|
| 641 | ||
| 642 | $this->setValidationMessages('update', $messages); |
|
| 643 | ||
| 644 | return $this; |
|
| 645 | } |
|
| 646 | ||
| 647 | /** |
|
| 648 | * Set the creation validation rules for the field. |
|