# MauticFormCallback is not defined

**URL:** <https://forum.mautic.org/t/mauticformcallback-is-not-defined/31857>\
**Category:** Product Support\
**Tags:** mautic-4\
**Created:** [April 25, 2024, 11:30pm UTC](https://forum.mautic.org/t/mauticformcallback-is-not-defined/31857 "2024-04-25T23:30:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jtimana](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/jtimana/32/2352_2.png) [@jtimana](https://forum.mautic.org/u/jtimana)\
**Post date:** [April 25, 2024, 11:30pm UTC](https://forum.mautic.org/t/mauticformcallback-is-not-defined/31857/1 "2024-04-25T23:30:07Z")

</div>

**Your software**  
My Mautic version is: 4.4.12  
My PHP version is: 8.0  
My Database type and version is: mariadb 10.6

**Your problem**  
My problem is: I’m trying to add custom JS validation using Mautic’s JS API, but I’m getting the following error in the console:

MauticFormCallback is not defined

I’ve been following this guide: [Mautic Developer Documentation](https://developer.mautic.org/#onvalidate())

These errors are showing in the log: nothing in the logs

Steps I have tried to fix the problem:

1. Create a form
2. Add the html field and add your validation code
3. Check the console for the error
