我需要在我的asp.net mvc(C#)應用程序中使用jQuery實現正則表達式。jquery正則表達式與自定義消息
我有一個形式的標誌,其中我需要驗證所需的正則表達式的字段。
說得更清楚一點,我的登錄表單中有Username
和Password
字段。我需要首先驗證,如果用戶輸入任何值,那麼我需要驗證正則表達式。
例如:如果輸入無效值,Username
必須至少爲5個字符,並且不能包含特殊字符。它應該說Please enter a valid Username with atleast 5 characters and no special characters
。
密碼必須最少5個字符,ATLEAST特殊字符,1個數字,如果輸入無效值,應該說Please enter a valid password with atleast 5 characters and should contain one numer and special character
所以我需要給自定義消息爲每個所需和正則表達式中的字段。
是否有常用的插件或函數用於jquery中的正則表達式?