OvertureDocs

Error styling

When the server returns field-level validation errors, the client renders a message immediately after each invalid field. You can style those messages by passing fieldErrorStyles:

<script src="https://script.app.overtureforms.com/contact-form.bundle.js" defer></script>
<script>
  window.addEventListener("DOMContentLoaded", function () {
    window.ContactFormHandler.initContactForms({
      publicKey: "YOUR_PUBLIC_KEY",
      formId: "YOUR_FORM_ID",
      fieldErrorStyles: {
        className: "field-error",
        color: "#b42318",
        fontSize: "0.875rem"
      }
    });
  });
</script>
  • className — applied to each error element (defaults to contact-form-error).
  • color — inline text color.
  • fontSize — inline font size.

Provide a className and style it in your own stylesheet for full control, or use color/fontSize for a quick inline treatment.