Implement ValidatorConstraintInterface and register it with @ValidatorConstraint, then create a convenience decorator using registerDecorator. The constraint class contains the validate() logic and defaultMessage() for the error text.
Set async: true on @ValidatorConstraint for validators that perform async operations like DB queries.