|
@@ 408-416 (lines=9) @@
|
| 405 |
|
* @throws ContainerExceptionInterface |
| 406 |
|
* @throws NotFoundExceptionInterface |
| 407 |
|
*/ |
| 408 |
|
protected static function createOnCreateValidator(ContainerInterface $container): JsonApiValidatorInterface |
| 409 |
|
{ |
| 410 |
|
assert( |
| 411 |
|
empty(static::ON_CREATE_VALIDATION_RULES_SET_CLASS) === false, |
| 412 |
|
'Validation rules set should be defined for class ' . static::class . '.' |
| 413 |
|
); |
| 414 |
|
|
| 415 |
|
return static::createJsonApiValidator($container, static::ON_CREATE_VALIDATION_RULES_SET_CLASS); |
| 416 |
|
} |
| 417 |
|
|
| 418 |
|
/** |
| 419 |
|
* @param ContainerInterface $container |
|
@@ 426-434 (lines=9) @@
|
| 423 |
|
* @throws ContainerExceptionInterface |
| 424 |
|
* @throws NotFoundExceptionInterface |
| 425 |
|
*/ |
| 426 |
|
protected static function createOnUpdateValidator(ContainerInterface $container): JsonApiValidatorInterface |
| 427 |
|
{ |
| 428 |
|
assert( |
| 429 |
|
empty(static::ON_UPDATE_VALIDATION_RULES_SET_CLASS) === false, |
| 430 |
|
'Validation rules set should be defined for class ' . static::class . '.' |
| 431 |
|
); |
| 432 |
|
|
| 433 |
|
return static::createJsonApiValidator($container, static::ON_UPDATE_VALIDATION_RULES_SET_CLASS); |
| 434 |
|
} |
| 435 |
|
|
| 436 |
|
/** |
| 437 |
|
* @param ContainerInterface $container |