Skip to content

Commit

Permalink
Merge pull request #5364 from archana-s/arch/addFormValidationForScri…
Browse files Browse the repository at this point in the history
…ptstage

fix(core): Validators for script stage
  • Loading branch information
archana-s committed May 23, 2018
2 parents bd2b5b8 + 9e03d01 commit e585e2e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Expand Up @@ -13,11 +13,11 @@
ng-model="stage.repoBranch"/>
</stage-config-field>
<stage-config-field label="Script Path" help-key="pipeline.config.script.path">
<input type="text" class="form-control input-sm"
<input type="text" class="form-control input-sm" required
ng-model="stage.scriptPath"/>
</stage-config-field>
<stage-config-field label="Command" help-key="pipeline.config.script.command">
<textarea class="form-control input-sm"
<textarea class="form-control input-sm" required
ng-model="stage.command"/>
</stage-config-field>
<stage-config-field label="Output File" help-key="pipeline.config.script.propertyFile">
Expand Down
Expand Up @@ -21,6 +21,7 @@ module(SCRIPT_STAGE, [])
templateUrl: require('./scriptStage.html'),
executionDetailsSections: [ScriptExecutionDetails, ExecutionDetailsTasks],
strategy: true,
validators: [{ type: 'requiredField', fieldName: 'command' }, { type: 'requiredField', fieldName: 'scriptPath' }],
});
})
.controller('ScriptStageCtrl', function($scope: IScope, stage: IStage) {
Expand Down
1 change: 1 addition & 0 deletions app/scripts/modules/core/src/presentation/main.less
Expand Up @@ -799,6 +799,7 @@ select:invalid {
&.ng-dirty,
&.ng-invalid-validate-min,
&.ng-invalid-validate-max,
&.ng-invalid-required,
&.highlight-pristine {
border-color: var(--color-danger);
.box-shadow(inset 0 1px 1px rgba(0, 0, 0, 0.075)); // Redeclare so transitions work
Expand Down

0 comments on commit e585e2e

Please sign in to comment.