Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1845
Ig Validator - Checking if control or form is in a valid state
posted

I'm trying to check to see if a control (or preferably, the entire form, but it doesn't seem like this is possible) is valid, but I'm always getting a "true" result even if the control shouldn't validate.

MVC Helper:

http://pastebin.com/cgj6pDcn

 

Then, I create a view for a IG textbox for a property "Qty" with the following annotations:

[Required]

[DataType("Int")]

[Range(12, 13)]

[Display(Name = "Qty")]

public int Qty { get; set; }

 

BLOCKED SCRIPT

var isValid = ($('#Qty').igValidator('isValidState'));

 

isValid is always true, no matter what's in the Qty textbox.  What am I doing wrong?

Parents
No Data
Reply Children