| 1 | <?php |
||
| 16 | class JobName extends AbstractPropertyValidator implements PropertyValidatorInterface |
||
| 17 | { |
||
| 18 | const DIC_NAME = 'JobNameValidator'; |
||
| 19 | |||
| 20 | const REG_EX_VALID_NAME = '/^[a-zA-Z0-9_-]*$/'; |
||
| 21 | const MESSAGE_TEMPLATE = '"%s" contains invalid characters. Please use only "a-z", "A-Z", "0-9" "-" and "_"'; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @inheritDoc |
||
| 25 | */ |
||
| 26 | 3 | public function isValid($sProperty, JobEntity $oJobEntity) |
|
| 34 | |||
| 35 | /** |
||
| 36 | * @param string $sName |
||
| 37 | * @return bool |
||
| 38 | */ |
||
| 39 | 3 | private function isNamePropertyValid($sName) |
|
| 43 | } |