src/api2/types.rs: define and use PASSWORD_REGEX

This commit is contained in:
Dietmar Maurer
2020-01-14 11:22:42 +01:00
parent ff620a3d1a
commit da4a15a351
2 changed files with 4 additions and 2 deletions

View File

@ -14,9 +14,9 @@ lazy_static! {
static ref CONFIG: SectionConfig = init();
}
// fixme: define better schemas
pub const REMOTE_PASSWORD_SCHEMA: Schema = StringSchema::new("Password or auth token for remote host.")
.format(&PASSWORD_REGEX)
.min_length(1)
.max_length(1024)
.schema();