Open FredrikEH opened 2 hours ago
// \src\components\form\textInput\index.js ... pattern = null, patternDescription = null, minLength = 0, maxLength = 50, isLocked = false }) => { ... const emailPattern = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/; // <-- Change this ...
// \src\components\form\textInput\index.js } else if (type === 'email') { return ( <div className="inputwrapper"> {label && <label htmlFor={name}>{label}</label>} <input type={type} name={name} value={value} onChange={handleChange} pattern={emailPattern} className={icon && 'input-has-icon'} // <-- Fix this /> {icon && <span className="input-icon">{icon}</span>} {error && <span className="error-message">{error}</span>} // <-- Check if something is missing for this to work </div> ); }
Approved