Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ameerul / FEQ-2343 Fix the issues on My profile page #126

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ const MyProfileAdDetailsTextArea = ({ control }: TMyProfileAdDetailsTextAreaProp
const { localize } = useTranslations();
const { isMobile } = useDevice();
const textSize = isMobile ? 'md' : 'sm';
const pattern = {
message: localize(
"Contact details can only include letters, numbers, spaces, and any of these symbols: -+.,'#@():;"
),
value: VALID_SYMBOLS_PATTERN,
};

return (
<>
Expand All @@ -37,7 +31,14 @@ const MyProfileAdDetailsTextArea = ({ control }: TMyProfileAdDetailsTextAreaProp
value={value}
/>
)}
rules={{ pattern }}
rules={{
pattern: {
message: localize(
"Contact details can only include letters, numbers, spaces, and any of these symbols: -+.,'#@():;"
ameerul-deriv marked this conversation as resolved.
Show resolved Hide resolved
),
value: VALID_SYMBOLS_PATTERN,
},
}}
/>
<Controller
control={control}
Expand All @@ -56,7 +57,14 @@ const MyProfileAdDetailsTextArea = ({ control }: TMyProfileAdDetailsTextAreaProp
value={value}
/>
)}
rules={{ pattern }}
rules={{
pattern: {
message: localize(
"Instructions can only include letters, numbers, spaces, and any of these symbols: -+.,'#@():;"
),
value: VALID_SYMBOLS_PATTERN,
},
}}
/>
</>
);
Expand Down
Loading