0

在尝试验证用户在 ValidationTextBox 中输入的 URL 时,我找不到任何东西来验证 URL 输入,例如“www.google.com”和“ http://www.google.com

<input dojoType="dijit.form.ValidationTextBox"  regExp="dojox.validate.regexp.url" tooltipPosition="below" required="true" placeHolder="Enter Rule url" type="text" name="ruleUrl" id="ruleUrl">

以上不起作用。验证 URL 的任何替代方法?

4

1 回答 1

2

Are you sure you added dojox/validate/regexp to your modules in a require()? Because the code seems to work perfectly. I also made an example JSFiddle.

于 2013-07-25T12:32:09.560 回答