I have created a custom contact form and I have set up an ajax inline validation. My form works very well. But Ajax validation only works when I am connected. When I am not logged in as an administrator, ajax validation does not work.
Also I created a block to display the form in my footer. This form does not appear when I am logged in as an administrator. When I am connected I have access to the form only through the path I defined in module.routing.yml. And when it appears (so when I'm not logged in and I'm just a visitor), Ajax doesn't work on this block form either.
Does anyone have any idea what could cause this? Please help me.