Form Input Custom Validation

I have a form with an email input. I want to create custom validation such that it checks that email value is a gmail email.

I add the logic check using a formula. When I test using a none gmail address the formula correctly evaluations to false but the isValid on the field and the entire form is set to null; furthermore, I don’t see a way to set a custom error message when my custom validation fails.

What I’m expecting to see is that if my custom validation function fails I see my custom error message.

Perhaps I’m misinterpreting how custom validation is designed to work?

Hi @przemek

Is your validation on form submit or on change? Can you check all the steps from: Form container | Documentation