我们在使用symfony时,可能会在Entity里对字段进行验证,比如说对身份证进行18位长度验证 ``` #[Assert\Length(min: 18, max: 18, exactMessage: '身份证不正确')] private