Skip to content

Instantly share code, notes, and snippets.

View caarlosdamian's full-sized avatar
🏰
Working from home

Carlos Damian caarlosdamian

🏰
Working from home
View GitHub Profile
@adrianhajdin
adrianhajdin / index.css
Created November 11, 2021 13:19
Build and Deploy a Fully Responsive Website with Modern UI/UX in React JS
.gpt3__whatgpt3 {
display: flex;
flex-direction: column;
padding: 2rem;
background: var(--color-footer);
/* ff 3.6+ */
background:-moz-radial-gradient(circle at 30% -100%, #042c54 25%, rgba(4, 44, 84, 1) 85%, rgba(27, 120, 222, 1) 100%);
@Klerith
Klerith / formik-email-validation.ts
Created October 9, 2021 14:44
Formik Email Validation
if (!values.email) {
errors.email = 'Required';
} else if (!/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i.test(values.email)) {
errors.email = 'Invalid email address';
}
@Klerith
Klerith / is-valid-email.ts
Created October 8, 2021 22:56
Email validation - customHook
const isValidEmail = ( email: string ) => {
const re = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
return re.test(email);
}