I need to restrict the value being typed into an Entry field to values between 0 and 20. However, I don't want highlight it in red if it's outside that range or anything, I want to actually prevent the value from appearing in the field if the user types 30, for example (the 3 would appear since it's valid but if the user then types a 0 it should not be accepted). I have successfully used behaviors to validate things like email addresses and date formats and was wondering if I can create a behavior to do this numeric validation and if so how I would go about it? Should I interrogate the entry using the TextChanged event or something?
↧