✅ Best way to do a at least one of two form validation

Hey,

I’m trying to do a validation for a contact form where either the email or the phone number is required. The docs only describe validation on field level. What’s the best way to achieve cross field validation like this?

You can check in the validator if the other field is filled:

 .withValidator(s -> {
        // Check here for other field
})

How I i access the value of the opposite TextField there if has not been written to the bean yet because validation failed?

textField.getValue()

Ah perfect! Could have found that myself… anyway thanks for helping me out learning this framework.

:white_check_mark: Best way to do a at least one of two form validation