| CARVIEW |
Select Language
HTTP/2 301
date: Sun, 28 Dec 2025 06:14:42 GMT
content-type: text/html; charset=UTF-8
location: https://docs.gravityforms.com/gform_form_validation_errors_markup/
server: cloudflare
strict-transport-security: max-age=604800
strict-transport-security: max-age=31536000; includeSubDomains
x-content-type-options: nosniff
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
x-xss-protection: 1; mode=block
x-frame-options: SAMEORIGIN
x-frame-options: SAMEORIGIN
content-security-policy: frame-ancestors 'self';
referrer-policy: no-referrer
referrer-policy: strict-origin-when-cross-origin
x-redirect-by: WordPress
fastcgi-cache: MISS
cf-cache-status: DYNAMIC
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=e21wmqNt7xMwgNIU5wN%2FaRcJIW4n029s7fvDWIJyH2sVbH%2FGfUyzqcrEW3bE9MMBBm3AeksKutZ5jUS0kPMd5e0I9hRGxbMRb8fDvcf2upPw89tp"}]}
cf-ray: 9b4eeb3ebe89cb77-BLR
HTTP/2 200
date: Sun, 28 Dec 2025 06:14:43 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
vary: Accept-Encoding
strict-transport-security: max-age=604800
strict-transport-security: max-age=31536000; includeSubDomains
x-content-type-options: nosniff
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
x-xss-protection: 1; mode=block
x-frame-options: SAMEORIGIN
x-frame-options: SAMEORIGIN
content-security-policy: frame-ancestors 'self';
referrer-policy: no-referrer
referrer-policy: strict-origin-when-cross-origin
link: ; rel="https://api.w.org/"
link: ; rel="alternate"; title="JSON"; type="application/json"
link: ; rel=shortlink
fastcgi-cache: HIT
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=%2FwuGKf8QxIleIbKCf3Cb7dNQwE9U6SurZC2NsNdMeoUrTtmBCFjlkD7gMBorSJYUnjNwtp4ey0iSh%2BBqMi2tFck9Fq5vgAn%2FJ7boh%2FgDaH4Lyi14"}]}
cf-cache-status: DYNAMIC
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
content-encoding: gzip
cf-ray: 9b4eeb450911cb77-BLR
gform_form_validation_errors_markup - Gravity Forms Documentation
gform_form_validation_errors_markup
Description
The gform_form_validation_errors_markup filter enables the markup for the validation errors list, which is located at the top of the form, to be overridden.
Usage
add_filter( 'gform_form_validation_errors_markup', 'your_function_name', 10, 2 );
You can also specify this per form by adding the form id after the filter name.
add_filter( 'gform_form_validation_errors_markup_6', 'your_function_name', 10, 2 );
Parameters
- $validation_errors_markup string
The HTML for the validation errors list.
-
$form Form Object
The current form object.
Examples
1. Basic usage
add_filter( 'gform_form_validation_errors_markup', function( $validation_errors_markup, $form ) {
// Do something with the $validation_errors_markup.
return $validation_errors_markup;
}, 10, 2 );
Placement
This code should be placed in the functions.php file of your active theme or a custom functions plugin.
Since
This filter was added in Gravity Forms v2.5.
Source Code
This filter is located in GFFormDisplay::get_validation_errors_markup() in form_display.php.