Binder + Select problem

I have one Select with a List of Strings(A, B and C). and I binder this select with a property in my bean, something like this:
binder.forField(field).asRequired(Utils.REQUIRED).bind(bean::getQualificacao, Bean::setQualificacao);

so when I read my bean from Database the value of field qualificacao are D, a value that not exists in my select

so in the screen my select are with anything selected.

so If I try to validate the binder that will return that are valid.

The correct isen`t returns false?

It’s correct because your database returned it and therefore the assumption of asRequired is fulfilled

But the binder validate the model instead the fields? there is any way to change this? to tell the binder to validate the components?

tks

The binder does validate the component… but you’ve added the value to the fields value. The server side field can’t ditch your non present value because they are valid use-cases for it.

If you are worried that your database is so inconsistent you need to add .withValidator(e ->) that checks your constrains.