Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.toggleForm();
this.$v.$reset();
set(this, 'team', {
name: '',
});
this.$bus.$emit('teamCreated', team);
this.$alert.$show(`Team '${team.name}' was created successfully`);
}).catch(handleHttpResponseError);
},
},
validations: {
team: {
owner_id: {
required: requiredIf(function () {
return window.isAdmin;
}),
},
name: {
required,
available(value) {
clearTimeout(this.timeout.name);
// required already taking care of this
if (value === '') {
return true;
}
return new Promise((resolve) => {
const searchTeam = () => {
validations() {
return {
gasPrice: {
required: requiredIf(
() => this.step === feeStep && this.session.experimentalMode
),
// we don't use SMALLEST as min gas price because it can be a fraction of uatom
// min is 0 because we support sending 0 fees
between: between(0, atoms(this.balance))
},
invoiceTotal: {
between: between(0, atoms(this.balance))
}
}
}
}
validations() {
return {
gasPrice: {
required: requiredIf(
() => this.step === feeStep && this.session.experimentalMode
),
// we don't use SMALLEST as min gas price because it can be a fraction of uatom
// min is 0 because we support sending 0 fees
between: between(0, atoms(this.balance))
}
}
}
}
validations() {
return {
password: {
required: requiredIf(
() =>
this.selectedSignMethod === signWithLocalKeystore &&
this.step === signStep
)
},
gasPrice: {
required: requiredIf(
() => this.step === feeStep && this.session.experimentalMode
),
// we don't use SMALLEST as min gas price because it can be a fraction of uatom
// min is 0 because we support sending 0 fees
between: between(0, atoms(this.balance))
},
invoiceTotal: {
between: between(0, atoms(this.balance))
}
required: 'Floating Pools required'
},
loadBalancerProviderName: {
required: 'Load Balancer Providers required'
}
}
const validations = {
secret: {
required
},
region: {
required
},
floatingPoolName: {
required: requiredIf(function () {
return this.infrastructureKind === 'openstack'
})
},
loadBalancerProviderName: {
required: requiredIf(function () {
return this.infrastructureKind === 'openstack'
})
}
}
export default {
name: 'new-shoot-infrastructure',
components: {
CloudProfile,
SecretDialogWrapper
},
validations: {
profileData: {
name: {
required,
minLength: minLength(3)
},
email: {
email,
required
},
password: {
required,
minLength: minLength(5)
},
confirm_password: {
required: requiredIf('isRequired'),
sameAsPassword: sameAs('password')
}
}
},
computed: {
isRequired () {
if (this.profileData.password === null || this.profileData.password === undefined || this.profileData.password === '') {
return false
}
return true
}
},
methods: {
...mapActions('userProfile', [
'uploadOnboardAvatar'
]),
}
export default {
name: 'hibernation-schedule-event',
props: {
scheduleEvent: {
type: Object,
required: true
}
},
validations: {
selectedDays: {
required
},
hibernateTime: {
required: requiredIf(function () {
return !this.wakeUpTime
})
},
wakeUpTime: {
required: requiredIf(function () {
return !this.hibernateTime
})
},
selectedTimezone: {
required
}
},
computed: {
...mapState([
'localTimezone'
]),
}
},
validations: {
formData: {
name: {
required
},
email: {
required,
email
},
password: {
minLength: minLength(5)
},
confirm_password: {
required: requiredIf('isRequired'),
sameAsPassword: sameAs('password')
}
}
},
computed: {
isRequired () {
if (this.formData.password === null || this.formData.password === undefined || this.formData.password === '') {
return false
}
return true
}
},
mounted () {
this.setInitialData()
},
methods: {
return object
},
validations: {
event: {
givenName: {
required,
},
definitions: {
fadeOutXCommands: {
required: requiredIf(function (model) {
return typeof model.fadeOutXCommands !== 'undefined'
}),
minValue: minValue(0)
},
fadeOutInterval: {
required: requiredIf(function (model) {
return typeof model.fadeOutInterval !== 'undefined'
}),
minValue: minValue(0)
},
runEveryXCommands: {
required: requiredIf(function (model) {
return typeof model.runEveryXCommands !== 'undefined'
}),
minValue: minValue(0)
},
runEveryXKeywords: {
required: requiredIf(function (model) {
return typeof model.runEveryXKeywords !== 'undefined'
}),
minValue: minValue(0)
},