String length validator - Node.js String

Node.js examples for String:Parse

Description

String length validator

Demo Code


  isSize: function(data, len){
    if(data.trim().length === len){
      return true;
    }else{/* w w  w  .  j  ava2s.co m*/
      return false;
    }
  },

Related Tutorials