In my model of user.rb
there are phone number and mobile number.
i want to validate if phone number and mobile number are exist or
not(not neccessary to do both).
how to do that
In my model of user.rb
there are phone number and mobile number.
i want to validate if phone number and mobile number are exist or
not(not neccessary to do both).
how to do that
Thriving K. wrote:
In my model of user.rb
there are phone number and mobile number.
i want to validate if phone number and mobile number are exist or
not(not neccessary to do both).how to do that
Write following code in model.
validates_presences_of :field_name
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs