Skip to content

Add ability to check specific error on field within Spring MVC test framework [SPR-11971] #16587

@spring-projects-issues

Description

@spring-projects-issues

Lea Farmer opened SPR-11971 and commented

It would be useful to have the ability to check that if a field has an error on it, then what that specific error is.

Currently ModelResultMatchers only has methods to assert whether an attribute has field errors.

I propose adding a new method

attributeHasFieldError(final String name, final String field, final String error)

This would allow users to assert when a specific error text/key is present.


Referenced from: commits 85cdb91

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions