mirror of
https://github.com/opensupports/opensupports.git
synced 2025-07-01 11:04:47 +02:00
* fix apidoc * add new custom validation * add ruby tests * add frontend error * take out the ternary
14 lines
278 B
PHP
14 lines
278 B
PHP
<?php
|
|
|
|
namespace CustomValidations;
|
|
|
|
use Respect\Validation\Rules\AbstractRule;
|
|
|
|
class ValidDepartmentName extends AbstractRule {
|
|
|
|
public function validate($name) {
|
|
$department = \Department::getDataStore($name, 'name');
|
|
return $department->isNull();
|
|
}
|
|
}
|