Guest User

Untitled

a guest
Jul 16th, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. AnnotationException: [Semantical Error] The annotation "@SymfonyComponentValidatorConstraintsPassword" in property NMSPMyBundleEntityUser::$password does not exist, or could not be auto-loaded.
  2.  
  3. //annotation declaration:
  4. /**
  5. * @ORMColumn(type="string", length="32", unique="true")
  6. *
  7. * @AssertMinLength(3)
  8. * @AssertPassword2()
  9. */
  10. protected $password;
  11.  
  12. //load files with the following in the code
  13. services:
  14. validator.password:
  15. class: NMSPMyBundleValidatorPasswordValidator
  16. tags:
  17. - { name: validator.constraint_validator, alias: password }
  18.  
  19. use NMSPMyBundleValidator as NMSPAssert;
  20.  
  21. @NMSPAssertPassword()
Add Comment
Please, Sign In to add comment