ruby on rails: add validation to form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jhansi
    New Member
    • Feb 2008
    • 6

    ruby on rails: add validation to form

    hi


    I have created a form with fields like first_name,last _name,date_of_b irth,
    land line---- std code, number
    mobile ,address fields.....

    Its working properly... but now I have to validate for

    1. if i enter the land line number and mobile number then address field should be accepted?
    2.If I enter the land line number without mobile number then also address field should be accepted?

    3. If I enter the mobile number without land line then it should display some msg address field should be entered.....


    land line number mobile number address
    std code number

    1. entered entered should be accept

    2. entered --------------- should be accepted

    3. ------------------- entered shouldn't be accepted..

    please send me the code what i should include....wait ing for the reply


    thank you,,,,,,,,,,,,
  • eWish
    Recognized Expert Contributor
    • Jul 2007
    • 973

    #2
    Please do not double post your questions. I have deleted your duplicate post. Also, before any code is going to be handed over you need to make an attempt first.

    Moderator

    Comment

    Working...