Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

vehicle number regex

Yup.string()
      .required("Vehicle Number is Required")
      .test(
        "vehicleNumber",
        "First two letters of the vehicle number should be capitalized and followed by a space, then the vehicle number should be in the format of 'AB 1234' or 'AB 1234 CDE'",
        (value) => {
          return /^[A-Z]{2}[ -][0-9]{1,2}(?: [A-Z])?(?: [A-Z]*)? [0-9]{4}$/i.test(
            value
          );
        }
      ),
Comment

PREVIOUS NEXT
Code Example
Javascript :: node appendFile sync 
Javascript :: js get distinct values from array 
Javascript :: select first 3 letters js 
Javascript :: change word in string javascript 
Javascript :: js sort by property 
Javascript :: js check if string is integer 
Javascript :: browserrouter react 
Javascript :: java superscript numbers 
Javascript :: javascript prompt 
Javascript :: nested destructuring javascript 
Javascript :: hello world in jsp 
Javascript :: get browser timezone 
Javascript :: change event listener in javascript 
Javascript :: download image jquery onclick 
Javascript :: fs.readdir example 
Javascript :: js make value positive 
Javascript :: get column from 2D array javascript 
Javascript :: add commas to a number javascript 
Javascript :: js create element from string 
Javascript :: remove selected bar mui tabs 
Javascript :: (node:63208) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead 
Javascript :: check if item exists in localstorage javascript 
Javascript :: javascript open new window 
Javascript :: asp.net core 3.1 convert system.string[] to javascript array 
Javascript :: implement the remove property function 
Javascript :: js array sum 
Javascript :: js get part of array 
Javascript :: how to tell c++ a function exists before calling 
Javascript :: Using "requireCordovaModule" to load non-cordova module "xcode" is not supported 
Javascript :: Jspinner max and min value 
ADD CONTENT
Topic
Content
Source link
Name
3+3 =