i use this code to validate the phone field.it should have only numbers.
but it also accepts alphapets with numbers.it should not accept other
below is my code i use.
errors.add(:phone_code, “*please enter valid phone number”) unless
is there any fault in my regular expression …
any helps pls…