src/api2/types.rs: also define PASSWORD_FORMAT and use it correctly
This commit is contained in:
parent
da4a15a351
commit
7e7b781a18
@ -81,6 +81,9 @@ pub const DNS_NAME_OR_IP_FORMAT: ApiStringFormat =
|
||||
pub const PROXMOX_USER_ID_FORMAT: ApiStringFormat =
|
||||
ApiStringFormat::Pattern(&PROXMOX_USER_ID_REGEX);
|
||||
|
||||
pub const PASSWORD_FORMAT: ApiStringFormat =
|
||||
ApiStringFormat::Pattern(&PASSWORD_REGEX);
|
||||
|
||||
|
||||
pub const PVE_CONFIG_DIGEST_SCHEMA: Schema = StringSchema::new(r#"\
|
||||
Prevent changes if current configuration file has different SHA256 digest.
|
||||
|
@ -15,7 +15,7 @@ lazy_static! {
|
||||
}
|
||||
|
||||
pub const REMOTE_PASSWORD_SCHEMA: Schema = StringSchema::new("Password or auth token for remote host.")
|
||||
.format(&PASSWORD_REGEX)
|
||||
.format(&PASSWORD_FORMAT)
|
||||
.min_length(1)
|
||||
.max_length(1024)
|
||||
.schema();
|
||||
|
Loading…
Reference in New Issue
Block a user