2016-12-07 24 views
0

當我們在手機上查看我們的表單時,我注意到所有驗證都會消失,我可以直接提交我的電子郵件地址而不用任何「@」或「。」。我認爲我已經採用了模式屬性來處理這個問題,它可以在桌面上無縫地運行,但不能在移動設備上運行。我在這裏做錯了什麼想法?表單驗證在手機中

<input type="email" name="email" placeholder="type your email..." class="textInput defaultText required email input-text" pattern="/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-][email protected][a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/" /> 

回答