-
Notifications
You must be signed in to change notification settings - Fork 230
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
Bug 1404147 - Prompt error message when create secret with invalid email #1030
Conversation
@@ -234,6 +234,11 @@ | |||
required> | |||
</div> | |||
</div> | |||
<div class="has-error" ng-show="secretForm.dockerEmail.$invalid && !secretForm.dockerEmail.$pristine"> | |||
<span class="help-block"> | |||
Email is invalid. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe
Email must be in the form of <var>user@domain</var>.
@@ -234,6 +234,11 @@ | |||
required> | |||
</div> | |||
</div> | |||
<div class="has-error" ng-show="secretForm.dockerEmail.$invalid && !secretForm.dockerEmail.$pristine"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd check specifically for secretForm.dockerEmail.$error.email
and have separate messages for invalid email values and missing required values.
@spadgett I've updated the PR based on your commets + added additional error messages for secret name, password & token, registry server address, registry user name, registry pw, registry email PTAL |
@@ -14,7 +14,7 @@ | |||
<div ng-if="newSecret.type"> | |||
<div class="form-group"> | |||
<label for="secretName" class="required">Secret Name</label> | |||
<span ng-class="{'has-error': nameTaken || (secretForm.secretName.$error.pattern && secretForm.secretName.$touched)}"> | |||
<span ng-class="{'has-error': nameTaken || ((secretForm.secretName.$error.required || secretForm.secretName.$error.pattern) && secretForm.secretName.$touched)}"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<span ng-class="{'has-error': nameTaken || (secretForm.secretName.$invalid && secretForm.secretName.$touched)}">
@@ -204,8 +214,13 @@ | |||
required> | |||
</div> | |||
</div> | |||
<div ng-show="secretForm.dockerUsername.$error.required && secretForm.dockerUsername.$touched" class="has-error"> | |||
<div class="help-block"> | |||
Email is required. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Username is required."
@@ -234,6 +253,14 @@ | |||
required> | |||
</div> | |||
</div> | |||
<div class="has-error" ng-show="secretForm.dockerEmail.$invalid"> | |||
<div ng-show="secretForm.dockerEmail.$error.email" class="help-block"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<div ng-show="secretForm.dockerEmail.$error.email && secretForm.dockerEmail.$touched" class="help-block">
That way the error doesn't flash as I type.
@spadgett thanks so much ! Commets addressed |
[merge] |
1 similar comment
[merge] |
Evaluated for origin web console merge up to d5aaf8c |
Origin Web Console Merge Results: SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin_web_console/855/) (Base Commit: 2446d7f) |
@jwforres PTAL