File tree Expand file tree Collapse file tree 8 files changed +10
-10
lines changed Expand file tree Collapse file tree 8 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ const directoryPath: FormatDefinition<string> = {
101101 } ,
102102} ;
103103
104- const password : FormatDefinition < string > = {
104+ const userPassword : FormatDefinition < string > = {
105105 validate : str => {
106106 // 8..32 characters, at least one letter and one number
107107 return 8 <= str . length && str . length <= 32 && / [ a - z ] / i. test ( str ) && / \d / . test ( str ) ;
@@ -130,7 +130,7 @@ export const ajvSelfPlugin = (ajv: Ajv): void => {
130130 ajv . addFormat ( "phone" , phone ) ;
131131 ajv . addFormat ( "directory-name" , directoryName ) ;
132132 ajv . addFormat ( "directory-path" , directoryPath ) ;
133- ajv . addFormat ( "password" , password ) ;
133+ ajv . addFormat ( "user- password" , userPassword ) ;
134134 ajv . addFormat ( "email" , email ) ;
135135} ;
136136
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ export const loginEmailSchema = {
1212 format : "email" ,
1313 } ) ,
1414 password : Type . String ( {
15- format : "password" ,
15+ format : "user- password" ,
1616 minLength : 8 ,
1717 maxLength : 32 ,
1818 } ) ,
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ export const loginPhoneSchema = {
1010 {
1111 phone : Type . String ( ) ,
1212 password : Type . String ( {
13- format : "password" ,
13+ format : "user- password" ,
1414 minLength : 8 ,
1515 maxLength : 32 ,
1616 } ) ,
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ export const registerEmailSchema = {
1313 } ) ,
1414 code : Type . Integer ( ) ,
1515 password : Type . String ( {
16- format : "password" ,
16+ format : "user- password" ,
1717 minLength : 8 ,
1818 maxLength : 32 ,
1919 } ) ,
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ export const registerPhoneSchema = {
1111 phone : Type . String ( ) ,
1212 code : Type . Integer ( ) ,
1313 password : Type . String ( {
14- format : "password" ,
14+ format : "user- password" ,
1515 minLength : 8 ,
1616 maxLength : 32 ,
1717 } ) ,
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ export const resetEmailSchema = {
1111 } ) ,
1212 code : Type . Integer ( ) ,
1313 password : Type . String ( {
14- format : "password" ,
14+ format : "user- password" ,
1515 minLength : 8 ,
1616 maxLength : 32 ,
1717 } ) ,
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ export const resetPhoneSchema = {
99 phone : Type . String ( ) ,
1010 code : Type . Integer ( ) ,
1111 password : Type . String ( {
12- format : "password" ,
12+ format : "user- password" ,
1313 minLength : 8 ,
1414 maxLength : 32 ,
1515 } ) ,
Original file line number Diff line number Diff line change @@ -8,13 +8,13 @@ export const userPasswordSchema = {
88 {
99 password : Type . Optional (
1010 Type . String ( {
11- format : "password" ,
11+ format : "user- password" ,
1212 minLength : 8 ,
1313 maxLength : 32 ,
1414 } ) ,
1515 ) ,
1616 newPassword : Type . String ( {
17- format : "password" ,
17+ format : "user- password" ,
1818 minLength : 8 ,
1919 maxLength : 32 ,
2020 } ) ,
You can’t perform that action at this time.
0 commit comments