Nelze vybrat více než 25 témat
Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
|
- <?php
-
- namespace App\Rules;
-
- use Illuminate\Contracts\Validation\Rule;
-
- abstract class BaseRule implements Rule
- {
- abstract public function check($value) : bool;
-
- /**
- * Determine if the validation rule passes.
- *
- * @param string $attribute
- * @param mixed $value
- * @return bool
- */
- public function passes($attribute, $value)
- {
- return $this->check($value);
- }
-
- /**
- * Get the validation error message.
- *
- * @return string
- */
- public function message()
- {
- return '正しくありません。';
- }
- }
|