Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return {
open: false,
form: {
name: '',
server: this.servers[0].id,
validity_time: 1,
validity_time_unit: 'years'
}
};
},
validations: {
form: {
name: { required },
validity_time: {
minValue: minValue(1),
maxValue: maxValue(1000)
},
validity_time_unit: {
timeUnitValid: isTimeUnitValid
}
}
},
computed: {
isValid () {
return !this.$v.$invalid;
},
value () {
return { ...this.form };
}
},
mounted () {
this.$emit('formUpdated', this.isValid);
validity_time: 1,
validity_time_unit: 'years'
}
};
},
validations: {
form: {
name: { required },
hostname: { required },
port: { required },
protocol: { required },
network: { required },
deploy_dns: { required },
validity_time: {
minValue: minValue(1),
maxValue: maxValue(1000)
},
validity_time_unit: {
timeUnitValid: isTimeUnitValid
}
}
},
computed: {
isValid () {
return !this.$v.$invalid;
},
value () {
return { ...this.form };
}
},
mounted () {
this.$emit('formUpdated', this.isValid);
validations() {
return {
value: {
required: this.required ? required : true,
min: this.min ? minValue(this.min) : true,
max: this.max ? maxValue(this.max) : true
}
};
}
}
validations () {
return {
value: {
minValue: minValue(1),
maxValue: maxValue(this.max) && !this.isSimpleOrConfigurable,
numeric,
required
}
}
},
watch: {
validations() {
return {
position: {
required: this.required ? required : true,
min: this.min ? minValue(this.min) : true,
max: this.max ? maxValue(this.max) : true
}
};
}
}