In my example below I’m using a dijit.form.DateTextBox:
<input type='text' name='startDate' dojoType='dijit.form.DateTextBox' constraints='{datePattern:'MM/dd/yyyy'}' value='<c:out value='${sessionScope.adminMessageForm.startDate}'/>' />
So for example, if the user starts to enter ‘asdf’ into the date the field turns yellow and a popup error message appears saying The value entered is not valid.. Even if I remove the constraints='{datePattern:'MM/dd/yyyy'}' it still validates.
Without going into details as to why, I would like to be able keep the dojoType and still prevent validation in particular circumstances.
Try overriding the validate method in your markup.
This will work (just tested):