Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to check if string is valid jwt

 function validateResourceName(string) {
 var pattern = /(w)*(?!)(w)*(?!)(w)*(?!)/g;
  if (!pattern.test(string)) {
    alert("not a match");
  } else {
    alert("match");
  }

}
if(JWS_REGEX.test('abc')){
console.log('valid token')
} else {
    console.log('not valid');
}
 
PREVIOUS NEXT
Tagged: #check #string #valid #jwt
ADD COMMENT
Topic
Name
9+8 =