Posted By

ptomas on 07/17/12


Tagged

regex check crm letters tikrinimas raides


Versions (?)

regex tikrina, ar tik raidės


 / Published in: JavaScript
 

patikrina nurodyto elemento užpildytas reikšmes. Pateikia pranešimą ir grąžina false, jei ne tik raidės.

  1. function isAlphabet (elem, helperMsg, field) {
  2. var alphaExp = /^[a-zA-Z]+$/;
  3. if(!elem.match(alphaExp))
  4. {
  5. alert(helperMsg);
  6. field.DataValue = null;
  7. event.returnValue = false;
  8. return false;
  9. }
  10. }

Report this snippet  

You need to login to post a comment.