date validation

Results 1 to 2 of 2

Thread: date validation

  1. #1
    Join Date
    Dec 1969

    Default date validation

    hi<BR> i am validating my forms. i have a problem with the date field validation. i am doing client side validation. my format of date is mm-dd-yyyy. i am using oracle 8.0 database. now i want if user enter date in dd-mm-yyyy format he should be prompted that invalid date. please tell how it will be done.<BR> thanx .

  2. #2
    Join Date
    Dec 1969

    Default This will be very tough

    There&#039;s really not a way to know what the user has intended when they entered it. For example if I entered: 02-03-2002 and I INTENDED "march second two thousand two" how would you know in your code I didn&#039;t mean "february third two thousand two" ? Answer? You CAN&#039;T unless you can see inside my head. <BR><BR>If I were you I would present clearly to your users the format they are supposed to be using. Another option would be to create dropdown boxes for each option so it&#039;s more obvious:<BR><BR><BR><BR>Or how about a little popup calendar?<BR><BR><BR>Many options to make it more fullproof to the user. Make sure you do use a date validation function though. This will help you catch obvious entries in the wrong order like 31-02-2003 but it won&#039;t catch everything.<BR><BR> javascript date faq:<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts