Reputation: 23
I am new to Dojo programming and trying to create a ValidationTextBox for username input. I would like to have three criteria: 1. users can only input alphanumeric characters and 2. minimum length of a username is 6 character 3. this field is required
So far my input looks like:
<input name="username"
type="text"
id="username"
class="reqd1"
required="true"
trim="true"
lowercase="true"
promptMessage="Username"
invalidMessage="Please only enter alphanumeric characters."
maxlength="12"
regExp="[\w]+"
intermediateChanges="false"
dojoType="dijit.form.ValidationTextBox" />
I have three questions: 1. how I can check for the the minimum character of the username field? 2. Is there a way to change the invalidMessage programatically? 3. How I can check the length of the username field without using regEx?
Upvotes: 2
Views: 4245
Reputation: 1411
Upvotes: 4