Bind the control to the class and then set a listener to the Validator so whenener a validation failed event occurs it fires.This allows all controls to be validated and checked with almost no code.
Finally, you will learn how you can validate user input conditionally, depending on choices that the user makes in a page.
I haven't been programming long and can't figure out how to fix this.
I have a small project for school and I can't figure out why I'm getting this error when validating inputs.
For some reason, despite the fact it should make sure that the value is numeric before it checks whether it's within a numerical range. This is the problem I'm having, I try things like this and it still doesn't work and I just don't know why. I don't understand at what point it's trying to convert to a double. I was returning true and false the wrong way around it appears because I needed to continue the loop it needed to be true where it would usually be false in regular validation.
It still sends me an error when I type nothing or a string in because it's trying to convert it to a double yet if I'm not doing any between range checks, it checks just fine if it's only numeric with no errors. By simply changing around in the input Valid function the true and false return types, it works fine.