Clean up and document validation strings

Also add a detail string for Required and Forbidden.  Fix tests.
This commit is contained in:
Tim Hockin
2015-11-14 12:26:04 -08:00
parent 27fc14000d
commit 43ed74748e
10 changed files with 236 additions and 199 deletions

View File

@@ -137,7 +137,7 @@ func TestNewInvalid(t *testing.T) {
},
},
{
field.Required(field.NewPath("field[0].name")),
field.Required(field.NewPath("field[0].name"), ""),
&unversioned.StatusDetails{
Kind: "Kind",
Name: "name",