Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

how to only accept email in the format of name@domain.com js

// It's easy
const email = "123@123.com"

function ValidateEmail(mail) {
    if (/^w+([.-]?w+)*@w+([.-]?w+)*(.w{2,3})+$/.test(mail)) {
      console.log("It's a valid email!")
    }else{
      console.log("Not a valid email :(")
    }
  }

  ValidateEmail(email);
Comment

PREVIOUS NEXT
Code Example
Javascript :: discord.js reliablehandler 
Javascript :: react execute code after set 
Javascript :: import withrouter 
Javascript :: javascript get a random number with 6 digits 
Javascript :: update replit node 
Javascript :: react conditional classname 
Javascript :: java script change url without reload 
Javascript :: creare component in anglar 
Javascript :: react material modal custom backdrop 
Javascript :: join last element of array javascript with different value 
Javascript :: json parse stringified array 
Javascript :: number to money javascript 
Javascript :: react native shadow generator 
Javascript :: iscolor 
Javascript :: json schmea typs 
Javascript :: get last element from div javascript 
Javascript :: button disabled angular 
Javascript :: select all checkboxes html js 
Javascript :: speed facebook video 
Javascript :: get the size of the screen javascript 
Javascript :: quotient js 
Javascript :: play store rejected app due non-certified ads SDK 
Javascript :: get api call in jquery 
Javascript :: javascript split array into chuncks of 
Javascript :: express session destroy 
Javascript :: js clear local storage 
Javascript :: javascript tan 
Javascript :: jquery einbinden in js 
Javascript :: how to import a javascript file 
Javascript :: jquery on change function not working 
ADD CONTENT
Topic
Content
Source link
Name
4+2 =