File tree Expand file tree Collapse file tree 2 files changed +22
-3
lines changed
components/PasswordTextField Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Original file line number Diff line number Diff line change 1
- import { Check , Clear , Visibility , VisibilityOff } from "@mui/icons-material" ;
1
+ import {
2
+ Check ,
3
+ Circle ,
4
+ Clear ,
5
+ Visibility ,
6
+ VisibilityOff ,
7
+ } from "@mui/icons-material" ;
2
8
import {
3
9
IconButton ,
4
10
InputAdornment ,
@@ -37,7 +43,16 @@ const TooltipMessage: React.FC<{
37
43
paddingTop : theme . spacing ( 0.7 ) ,
38
44
} ) }
39
45
>
40
- { validator . validate ( input ) ? (
46
+ { ! input ? (
47
+ < Circle
48
+ sx = { ( theme ) => ( {
49
+ fontSize : theme . spacing ( 0.8 ) ,
50
+ marginTop : theme . spacing ( 0.8 ) ,
51
+ marginLeft : theme . spacing ( 0.8 ) ,
52
+ color : "white" ,
53
+ } ) }
54
+ />
55
+ ) : validator . validate ( input ) ? (
41
56
< Check
42
57
sx = { ( theme ) => ( {
43
58
fontSize : theme . spacing ( 2.5 ) ,
Original file line number Diff line number Diff line change @@ -12,7 +12,10 @@ import { ToastContainer } from "react-toastify";
12
12
import "react-toastify/dist/ReactToastify.css" ;
13
13
import { useForm } from "react-hook-form" ;
14
14
import PasswordTextField from "../../components/PasswordTextField" ;
15
- import { USE_AUTH_ERROR_MESSAGE } from "../../utils/constants" ;
15
+ import {
16
+ PASSWORD_REQUIRED_ERROR_MESSAGE ,
17
+ USE_AUTH_ERROR_MESSAGE ,
18
+ } from "../../utils/constants" ;
16
19
17
20
const SignUp : React . FC = ( ) => {
18
21
const navigate = useNavigate ( ) ;
@@ -138,6 +141,7 @@ const SignUp: React.FC = () => {
138
141
input = { watch ( "password" , "" ) }
139
142
{ ...register ( "password" , {
140
143
setValueAs : ( value : string ) => value . trim ( ) ,
144
+ required : PASSWORD_REQUIRED_ERROR_MESSAGE ,
141
145
validate : { passwordValidator } ,
142
146
} ) }
143
147
error = { ! ! errors . password }
You can’t perform that action at this time.
0 commit comments