Skip to content

Commit

Permalink
Merge pull request #3309 from bettyblocks/bug/emailvalidation-message…
Browse files Browse the repository at this point in the history
…-not-working-TECHSUP-8659

bugfix in email input where the validation message is not showing
  • Loading branch information
ingmar-stipriaan authored Dec 28, 2023
2 parents 09fa41a + 3ed9f5e commit 6d4904c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/textinput.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
const isDev = env === 'dev';
const isNumberType = type === 'number';
const isPasswordType = type === 'password';
const isEmailType = type === 'email';
const [isDisabled, setIsDisabled] = useState(disabled);
const [showPassword, togglePassword] = useState(false);
const [errorState, setErrorState] = useState(error);
Expand Down Expand Up @@ -161,7 +162,7 @@
let { validity: validation } = target;
const { value: eventValue } = target;

if (isNumberType || multiline) {
if (isNumberType || multiline || isEmailType) {
validation = customPatternValidation(target);
}
const numberValue =
Expand Down

0 comments on commit 6d4904c

Please sign in to comment.