opensupports/server/libs/validations/staffEmail.php

15 lines
253 B
PHP

<?php
namespace CustomValidations;
use Respect\Validation\Rules\AbstractRule;
class StaffEmail extends AbstractRule {
public function validate($email) {
$user = \Staff::getUser($email, 'email');
return !$user->isNull();
}
}