Validators

PSce helps to determine data types under methods

  Validator.isNumeric(str:string):bool
 
  Validator.isMail(str:string):bool
 
  Validator.isHex(str:string):bool
 
  Validator.isBase64(str:string):bool
 
  Validator.isBase32(str:string):bool
 
  Validator.isMACAddress(str:string):bool
 
  Validator.isOctal(str:string):bool
 
  Validator.isJSON(str:string):bool
 
  Validator.isStrongPassword(str:string):bool
 
  Validator.isAscii(str:string):bool
 
  Validator.isIP(str:string):bool
 

Example```javascript

if ((await Validator.isNumeric("1234"))==false)
    return {error:1,message:'Its Not A Numeric!'};
else
    return {error:0};
When the above codes executed  Screen returns 
{error:0}

Last updated