如何在/config/validation.yaml
添加文件作为映射验证,以避免在DTO中使用注释 ?
Is quite simple.
Just add in validator.yaml file the following:
framework:
validation:
email_validation_mode: html5
mapping:
paths:
- '%kernel.project_dir%/src/<path to validation file>'
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.