Skip to content

Feature/ncj remove validator#681

Merged
t-anjam merged 3 commits intoncjfrom
feature/ncj-removeValidator
Sep 8, 2017
Merged

Feature/ncj remove validator#681
t-anjam merged 3 commits intoncjfrom
feature/ncj-removeValidator

Conversation

@t-anjam
Copy link

@t-anjam t-anjam commented Sep 8, 2017

Remove required validator when a defaultValue is present and it's value is an empty string. Needed if we want to give users optional arguments. Might want to consider adding a "required" field in the job/pool template for parameters in the future.

@msftclas
Copy link

msftclas commented Sep 8, 2017

@t-anjam,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

let defaultValue = null;
if (template.parameters[key].defaultValue) {
let validator = Validators.required;
if (template.parameters[key].defaultValue || template.parameters[key].defaultValue === "") {
Copy link
Member

Choose a reason for hiding this comment

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

exists(template.parameters[key].defaultValue)

@t-anjam t-anjam merged commit 94e9ccb into ncj Sep 8, 2017
@timotheeguerin timotheeguerin deleted the feature/ncj-removeValidator branch October 13, 2017 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants