diff --git a/client/lib/form-state/index.js b/client/lib/form-state/index.js index 4ae1bb98a8c46b..f50f68aaacb1fc 100644 --- a/client/lib/form-state/index.js +++ b/client/lib/form-state/index.js @@ -309,8 +309,8 @@ function isFieldValidating( formState, fieldName ) { } function getInvalidFields( formState ) { - return filter( formState, function( field ) { - return isFieldInvalid( formState, field.name ); + return filter( formState, function( field, fieldName ) { + return isFieldInvalid( formState, fieldName ); } ); } function getErrorMessages( formState ) {