mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
🐛 Fix error when opening ftp/sftp credentials (#2298)
* n8n-2513 fix error when opening credentials * clean up validation logic
This commit is contained in:
@@ -53,7 +53,21 @@ export default Vue.extend({
|
||||
},
|
||||
computed: {
|
||||
showRequiredErrors(): boolean {
|
||||
return this.$props.parameter.type !== 'boolean' && !this.value && this.$props.parameter.required && (this.blurred || this.showValidationWarnings);
|
||||
if (!this.$props.parameter.required) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.blurred || this.showValidationWarnings) {
|
||||
if (this.$props.parameter.type === 'string') {
|
||||
return !this.value;
|
||||
}
|
||||
|
||||
if (this.$props.parameter.type === 'number') {
|
||||
return typeof this.value !== 'number';
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
|
||||
Reference in New Issue
Block a user