We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
const requeirFn = (e) => { e.target.value = e.target.value.replace(/[^a-z]/, ''); }; return ( <form onSubmit={handleSubmit(onSubmit)}> <input className={styles.input} type="text" placeholder="url" onInput={requeirFn} {...register('url', { max: 0, min: 1, required: true, maxLength: 70, pattern: /[a-z]/i, })} />
리엑트 훅 폼에서 제공해주는 required는 Submit 이벤트가 발생 되었을 때 작동되고, 처음부터 사용자가 입력 할 때부터 제한하게 하려면 onInput속성에 로직이 필요합니다.
The text was updated successfully, but these errors were encountered:
new-crystal
0gunkim
No branches or pull requests
리엑트 훅 폼에서 제공해주는 required는 Submit 이벤트가 발생 되었을 때 작동되고, 처음부터 사용자가 입력 할 때부터 제한하게 하려면 onInput속성에 로직이 필요합니다.
The text was updated successfully, but these errors were encountered: