Validator#validateValue() is used to validate whether the constraints of a given bean property would be satisfied if the property had the given value. Therefore the type of the passed value must match with the value of the given property.
That's not the case in your example, the property testField is of type JTextField, while a string is passed to validateValue(). You could pass a JTextField instance to validateValue(), but then you'd still get a UnexpectedTypeException as there is no validator for @NotBlank on JTextField properties. So as you say, you would have to implement and register such a validator.
Validator#validateValue() is used to validate whether the constraints of a given bean property would be satisfied if the property had the given value. Therefore the type of the passed value must match with the value of the given property.
That's not the case in your example, the property testField is of type JTextField, while a string is passed to validateValue(). You could pass a JTextField instance to validateValue(), but then you'd still get a UnexpectedTypeException as there is no validator for @NotBlank on JTextField properties. So as you say, you would have to implement and register such a validator.