This doesn't seem right? Javascript isn't working

前端 未结 1 1740
情话喂你
情话喂你 2020-12-22 15:23

I\'m creating my Javascript and have had help. I\'m making the following fields required..

First Name Last Name Phone Email

相关标签:
1条回答
  • 2020-12-22 15:55

    Try this to limit your phone character:

    ['phone', elem('phone').value.length > 7 && elem('phone').value.length < 11 && /^(\+\d{1,2})?[\d ()-]+$/.test(elem('phone').value)]
    

    As for your email validation, I don't see something went wrong with that. The error message does disappear after a while.

    Hope it helps!

    0 讨论(0)
提交回复
热议问题