Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add validation error explanation for long annotations. #5786

Merged
merged 1 commit into from
Mar 24, 2015

Conversation

fgrzadkowski
Copy link
Contributor

This fixes #3087

@wojtek-t wojtek-t added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 23, 2015
@wojtek-t
Copy link
Member

LGTM

@@ -133,8 +133,8 @@ func NewFieldNotFound(field string, value interface{}) *ValidationError {
return &ValidationError{ValidationErrorTypeNotFound, field, value, ""}
}

func NewFieldTooLong(field string, value interface{}) *ValidationError {
return &ValidationError{ValidationErrorTypeTooLong, field, value, ""}
func NewFieldTooLong(field string, value interface{}, maxLength string) *ValidationError {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is max length a string?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because in the only use-case we have it also contains units (e.g. "1234 B")

@wojtek-t
Copy link
Member

Also, please rebase.

@fgrzadkowski
Copy link
Contributor Author

Rebased.

saad-ali added a commit that referenced this pull request Mar 24, 2015
Add validation error explanation for long annotations.
@saad-ali saad-ali merged commit 282f605 into kubernetes:master Mar 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

REST api - error messages should clearly explain the problem, 'invalid value' is too general
6 participants