@@ -29,7 +29,7 @@ const PasswordTextField: React.FC<PasswordTextFieldProps> = ({
29
29
} ) => {
30
30
const validatePasswordError = (
31
31
passwordVal : boolean ,
32
- password : string ,
32
+ password : string
33
33
) : boolean => {
34
34
return passwordVal
35
35
? password . length < 8 ||
@@ -44,7 +44,7 @@ const PasswordTextField: React.FC<PasswordTextFieldProps> = ({
44
44
const comparePasswordError = (
45
45
isMatch : boolean ,
46
46
password : string ,
47
- passwordToMatch : string | undefined ,
47
+ passwordToMatch : string | undefined
48
48
) : boolean => {
49
49
return isMatch ? password != passwordToMatch : false ;
50
50
} ;
@@ -65,7 +65,7 @@ const PasswordTextField: React.FC<PasswordTextFieldProps> = ({
65
65
validatePasswordError ( passwordVal , password ) ||
66
66
comparePasswordError ( isMatch , password , passwordToMatch ) ||
67
67
checkEmptyError ( password )
68
- ) ,
68
+ )
69
69
) ;
70
70
} , [ passwordVal , isMatch , password , passwordToMatch , setValidity ] ) ;
71
71
@@ -74,13 +74,13 @@ const PasswordTextField: React.FC<PasswordTextFieldProps> = ({
74
74
const handleClickShowPassword = ( ) => setShowPassword ( ( show ) => ! show ) ;
75
75
76
76
const handleMouseDownPassword = (
77
- event : React . MouseEvent < HTMLButtonElement > ,
77
+ event : React . MouseEvent < HTMLButtonElement >
78
78
) => {
79
79
event . preventDefault ( ) ;
80
80
} ;
81
81
82
82
const handleMouseUpPassword = (
83
- event : React . MouseEvent < HTMLButtonElement > ,
83
+ event : React . MouseEvent < HTMLButtonElement >
84
84
) => {
85
85
event . preventDefault ( ) ;
86
86
} ;
@@ -93,7 +93,7 @@ const PasswordTextField: React.FC<PasswordTextFieldProps> = ({
93
93
validatePasswordError ( passwordVal , val ) ||
94
94
comparePasswordError ( isMatch , val , passwordToMatch ) ||
95
95
checkEmptyError ( val )
96
- ) ,
96
+ )
97
97
) ;
98
98
} ;
99
99
@@ -156,9 +156,9 @@ const PasswordTextField: React.FC<PasswordTextFieldProps> = ({
156
156
>
157
157
Password must contain at least 1 digit
158
158
</ FormHelperText >
159
- { /*eslint-disable-next-line no-useless-escape*/ }
160
159
< FormHelperText
161
160
sx = { ( theme ) => ( { color : theme . palette . success . main } ) }
161
+ // eslint-disable-next-line no-useless-escape
162
162
error = { ! / [ ` ! @ # $ % ^ & * ( ) _ + \- = \[ \] { } ; ' : " \\ | , . < > \/ ? ~ ] / . test ( password ) }
163
163
>
164
164
Password must contain at least 1 special character
0 commit comments