File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,8 @@ const SignUp: React.FC<RouteComponentProps> = (props: RouteComponentProps) => {
106106 }
107107
108108 if ( ! validateFlat ( flat ) ) {
109- toast . error ( 'Invalid Flat Number. Flat Number should be of type XX-NN' , { autoClose : 6000 } ) ;
109+ toast . error ( 'Invalid Flat Number. Flat Number should be of type X*-N* (Example: Sapphire-456)'
110+ , { autoClose : 6000 } ) ;
110111 return ;
111112 }
112113 const { data } : ExecutionResult = await createUser ( {
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ const validatePassword = (password: string): boolean => {
2424 * Flat Number Validation
2525 */
2626const validateFlat = ( flat : string ) : boolean => {
27- if ( / [ A - Z ] - [ 0 - 9 { 1 - 2 } ] / g. test ( flat ) ) {
27+ if ( / [ ( ( A - Z { 1 , 9 } ) | ( a - z { 1 , 9 } ) ] - [ 0 - 9 { 1 - 9 } ] / g. test ( flat ) ) {
2828 return true ;
2929 }
3030 return false ;
You can’t perform that action at this time.
0 commit comments