Specific validator in com.vaadin.flow.data.validator missing a constructor

Hi,

UPDATE: I update the code part. It was a little bit misleading ;-).

i encounter with problem in i18n and binder validation messages. Methods like asRequired in the Binder supports an alternative to a fixed message (ErrorMessageProvider).

The AbstractValidator class seem to support it, but missing a constructor with a “MessageProvider”.

Example:

binder...asRequired(vc -> getTranslation("something")
binder...withValidator(new EmailValidator(????)

To fix this, I rewrite all Validator to support this (use my own AbstractValidator implementation). Is there a reason, why this is not supported?

Thanks,
Dirk