In the following example, the validated status will update based on the value of the number input and how far from the number 5 it is.