You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- <?php
-
- namespace App\Rules;
-
- use App\Models\Htpms\MstCustomer;
-
- class CustomerCode extends BaseRule
- {
-
- /**
- * Create a new rule instance.
- *
- * @return void
- */
- public function __construct()
- {
- }
-
-
- public function check($value) : bool
- {
- return MstCustomer::customerCode($value)->exists();
- }
-
- /**
- * Get the validation error message.
- *
- * @return string
- */
- public function message()
- {
- return trans('validation.exists');
- }
- }
|