feat: proxy password validation
This commit is contained in:
@@ -54,6 +54,13 @@ User.init(
|
||||
proxy_username: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: true,
|
||||
validate: {
|
||||
isProxyPasswordRequired(value: string | null) {
|
||||
if (value && !this.proxy_password) {
|
||||
throw new Error('Proxy password is required when proxy username is provided');
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
proxy_password: {
|
||||
type: DataTypes.STRING,
|
||||
|
||||
Reference in New Issue
Block a user