dhii / validation-abstract
常用的验证抽象功能。
v0.2-alpha1
2018-03-07 21:05 UTC
Requires
- php: ^5.3 | ^7.0
- dhii/validation-interface: ^0.2
Requires (Dev)
- codeclimate/php-test-reporter: <=0.3.2
- dhii/php-cs-fixer-config: dev-php-5.3
- dhii/stringable-interface: ^0.1
- phpunit/phpunit: ^4.8
- ptrofimov/xpmock: ^1.1
Suggests
- dhii/i18n-helper-base: For string internationalization
- dhii/iterator-helper-base: For implementations of iterable-related helper functionality
- dhii/normalization-helper-base: For simple types normalization
- dhii/stringable-interface: To be able to pass stringable objects instead of strings
- dhii/validation-interface: Needed to be able to create exceptions that are expected to be thrown
This package is auto-updated.
Last update: 2024-09-07 03:18:45 UTC
README
常用的验证抽象功能。
特性
ValidateCapableTrait
- 验证功能。如果在验证过程中检测到错误,则抛出ValidationFailedExceptionInterface
。IsValidCapableTrait
- 以布尔方式确定主题是否有效。GetValidationErrorsCapableCompositeTrait
- 使用子验证器列表生成错误列表。ChildValidatorsAwareTrait
- 了解子验证器。ValidatorAwareTrait
- 了解验证器。SpecAwareTrait
- 了解验证规范。对于针对规范进行验证的验证器非常有用。ValidationSubjectAwareTrait
- 了解验证主题,即正在验证的内容。ValidationErrorsAwareTrait
- 了解验证错误列表,即验证失败的原因。