Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

Added validation error messages to register hce + hcf forms #406

Merged
merged 1 commit into from
Jun 24, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ <h2 translate>Register Cluster</h2>
<div class="form-group" focusable-input
ng-class="{'has-error': addClusterFormCtrl.addClusterForm.url.$invalid && addClusterFormCtrl.addClusterForm.url.$dirty}">
<label class="control-label" translate>Cluster URL</label>
<span class="control-message">
<span translate
ng-if="addClusterFormCtrl.addClusterForm.url.$error.pattern && addClusterFormCtrl.addClusterForm.url.$dirty">
Invalid url format
</span>
<span translate
ng-if="addClusterFormCtrl.addClusterForm.url.$error.helionUnique && addClusterFormCtrl.addClusterForm.url.$dirty">
Url is not unique
</span>
</span>
<input type="text" name="url" class="form-control" ng-model="addClusterFormCtrl.url"
ng-pattern="/^http(s)?://api\.(.)+$/" required
helion-unique items="addClusterFormCtrl.existingApiEndpoints" ignore-case/>
Expand Down
10 changes: 10 additions & 0 deletions src/app/view/hce-registration/hce-registration.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
<div class="form-group" focusable-input
ng-class="{'has-error': hceRegistrationForm.url.$invalid && hceRegistrationForm.url.$dirty}">
<label class="control-label" translate>Code Engine Endpoint</label>
<span class="control-message">
<span translate
ng-if="hceRegistrationForm.url.$error.pattern && hceRegistrationForm.url.$dirty">
Invalid url format
</span>
<span translate
ng-if="hceRegistrationForm.url.$error.helionUnique && hceRegistrationForm.url.$dirty">
Url is not unique
</span>
</span>
<input type="text" name="url" class="form-control" ng-model="detailViewCtrl.context.data.url"
required
ng-pattern="/^http(s)?://(.)+$/"
Expand Down