--- title: "Forms - Custom Form Validation (JavaScript)" slug: "forms-custom-form-validation-javascript" updated: 2023-03-22T22:14:01Z published: 2023-03-22T22:14:01Z canonical: "docs.interprose.com/forms-custom-form-validation-javascript" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.interprose.com/llms.txt > Use this file to discover all available pages before exploring further. # Custom Form Validation (JavaScript) ## **Validate Data** - Use Custom JavaScript to verify data exists or meets expectations - Display an error if valid data doesn't exist when saving the completed form ## **Custom JavaScript** Must be entered and saved to the form's Custom Validation section ### **Setup** Custom Validation can be entered under **Setup -Forms -Form -Selected Form Custom Validation (JavaScript)** section ![mceclip2.png](https://cdn.document360.io/6c7303ca-5ffc-4149-8868-8ea498eee635/Images/Documentation/javaform.png?sv=2026-02-06&spr=https&st=2026-10-31T16%3A38%3A17Z&se=2026-10-31T17%3A38%3A17Z&sr=c&sp=r&sig=I%2B6V6MkIo1LSgoyOqklAqDp%2FJ5WSibUCAkkRKQowDEQ%3D) Here is an example of Custom Validation JavaScript: ``` if (form.lookupFieldValue("VERIFY_ADDRESS") === "1" && form.lookupFieldValue("CORRECT_MAILING_ADDRESS") === ""){errors.add("An address must be entered, before this record can be saved");} ``` Watch the video below for additional guidance.