[skip ci] update numeric only on verify code

This commit is contained in:
Wikzyy
2025-06-05 14:33:30 +07:00
parent a5e997eb54
commit 731c1a23c2

View File

@ -151,14 +151,18 @@ const Login = () => {
<input <input
placeholder="Enter code verify" placeholder="Enter code verify"
type="text" type="text"
inputMode='numeric' inputMode="numeric"
autoComplete="off" autoComplete="off"
maxLength={6} maxLength={6}
{...formik.getFieldProps('token')} {...formik.getFieldProps('token')}
className={clsx('form-control', { className={clsx('form-control', {
'is-invalid': formik.touched.token && formik.errors.token 'is-invalid': formik.touched.token && formik.errors.token
})} })}
onKeyPress={handleKeyPress} onKeyPress={(e) => {
if (!/[0-9]/.test(e.key)) {
e.preventDefault();
}
}}
/> />
</label> </label>
{formik.touched.token && formik.errors.token && ( {formik.touched.token && formik.errors.token && (