Login Register

validate

Unable to validate a *TextBox

Hello ! :)

Do you know why I can't have a focus with the error message displayed on a *TextBox element (ValidationTextBox, CurrencyTextBox, etc) to validate it ?
when I try dijit.byId ('myElt').validate (true), or .isValid (true), .getErrorMessage (true), .getPromptMessage (true), nothing works !

The only thing that can be used is to set the focus to the specified element, and set the focus to another element, that will display the warning image, but without the prompt message.

It's tricky and not completly functionnal

Do you have a solution for me please ? :)

filteringSelect and required="true"

I just discovered the very cool dijit.byId("myForm").validate functionality! Works great, but I'm not seeing anywhere on how I might hook up a filteringSelect.... I tried the basic stuff like inserting a required="true" into the filteringSelect declaration, but no luck. Anyone done this?

Thanks!
Nathan

[ValidationTextBox] - How to Show the Prompt Error Message ?

Hi !
I have a understandable problem on dojo and I believe you can help me.

I use a ValidationTextBox, and when the user click on the submit button, I check all the elements into a function.

In this function I do dijit.byId('myElt').isValid (true) and if it's not valid, I would like to display the prompt message.

ValidationTextBox focus, validation and the warning tip

Hello:

According to the docs, "ValidationTextbox extends [dijit.form.Textbox] by validating the input when the box loses focus." (My emphasis)

However, the warning icon and tooltip appear whenever the input isn't correct (not when focus is lost) in my application, as well as on the demo page.

So, for example, here's some code:

var crn = new dijit.form.ValidationTextBox({name: "crn_name_" + fieldCount, id: "crn_id_" + fieldCount, regExp: "\\d{5}", invalidMessage: "Please enter a CRN.", maxLength: "5", trim: "true", style: "width:5em;"}, spanNode);
Syndicate content