commonutil.js 260 B

1234567891011121314
  1. export default class commonutil {
  2. //验证手机号
  3. static isPoneAvailable(str) {
  4. let myreg = /^[1][0-9]{10}$/;
  5. if (str.length == 0 || str == null) {
  6. return false;
  7. } else if (!myreg.test(str)) {
  8. return false;
  9. } else {
  10. return true;
  11. }
  12. }
  13. }