I'm making validation of an email input in my React App, but I want that input should have both @ and .(dot) while submitting the form. I tried the .some() method but if only one condition is true then it will return true but I want both:
const emailValidation = ["@", "."];
<input
type="text"
placeholder="Email"
value={email}
onChange={(e) => setEmail(e.target.value)}
onBlur={(e) => {
setIsEmailValid(
emailValidation.some((el) => e.target.value.includes(el))
);
}}
/>