Sc_field_display doesn't work in the onValidate and onValidateFailure event

I need an hidden field to appear on a form if validation failed
I try to put the sc_field_display({field},‘on’) in onValidate and I also try it in onValidateFailure
The error message is showing correctly, but the field stay hidden

Thanks

I have recreated the app from scratch and it’s working correctly now.