Do you want to change the standard error text (when people did something wrong on your form). It looks quite unfriendly, the standard validation error. So let’s make it a little bit more friendly. You find the PHP and CSS code you need to do just that.

Change text error message
You can change the text of the Gravity Forms 2.5 and later error message by adding the following PHP text to your functions.php file in your WordPress theme directory.

Styling Error message in Gravity Forms 2.5 and later
This is how the standard (default) GF validation error in GF 2.5 and later looks like.

Change colors
If you want to change the color of the background and the border line of the message at the top, use this CSS to override. You can also change the shadow effect (we left it here the same).
Notice that we’ve added body in front of the .gform_wrapper. You can also place the CSS without body in front of it, but be sure that this custom CSS is loaded later than the Gravity Forms default styling. Or you can add !important, but this makes it harder if you want to style error message differently on different places on your site.
It will look like this now:

We don’t want to use such a bright red color, so we also will change the color of the text. You can do that by adding this CSS:
This is how we want it:

But we also want to change the red colors in the highlighted fields itself:

To do that, we can add the following CSS to our custom theme or in the customizer of the WordPress website:
This looks much nicer and in line with our theme:

Use SCSS
You can also achieve the same as the above CSS code with the more readable SCSS code here:
Gravity Forms 2.4 and earlier
Gravity Forms 2.4 has a different styling, so you’ll need to use different PHP and CSS for 2.4 and earlier.
Changing error message with PHP in 2.4 and earlier
Standard Gravity Forms validation error
This is how the standard (default) GF validation error in GF 2.4 and earlier looks like.

New (more friendly) Gravity Forms validation error
Now we want to create a more friendly and visually attractive error message for Gravity Forms.

Changing the looks (CSS)
You can change the looks by adding the following CSS code to your custom style.css file in your WordPress theme directory.
Extra: Change the fields
This will change the background and border color of the highlighted fields & change the color of the label and the required text.
And this will change the border for input fields to black (and not red):
Read more tutorials about Rocketgenius, Inc.
