Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8534071
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:06:38+00:00 2026-06-11T10:06:38+00:00

I have a form with 3 select fields used for users dob(one for month,

  • 0

I have a form with 3 select fields used for users dob(one for month, day, year). Once the form is submitted, I need to do a check to make sure that if those date fields have been filled, that the data is consistent.

The field is not required, so the data is only handled by the server if all of the fields are filled. But I’m concerned about how to handle the error of when the user submits some of the fields filled, and others not filled. So if the user submits the year, and month, but not the day, and so on and so forth.

Any suggestions, or help will be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T10:06:39+00:00Added an answer on June 11, 2026 at 10:06 am

    Use PHP’s checkdate function

    bool checkdate ( int $month , int $day , int $year )
    
    Checks the validity of the date formed by the arguments. 
    A date is considered valid if each parameter is properly defined.
    

    Pass in their entered parameters, and it will check that it’s a valid date – as well as telling you about empty parameters, it will also tell you if someone tries the 30th of February.

    You just need to check if any of the fields are filled in (as it’s optional); and if that’s so, pass all three into checkdate.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two select fields in a form. Every time one of these select
I have a vaadin form with huge number of fields in it(textbox, select box
I have a form with 3 select elements. Each one, by default, has option
jQuery Validation plugin is used to validate all form data: http://docs.jquery.com/Plugins/Validation Have 3 select
I have an hidden input field with a value, <form> <input type=hidden value=product/> <select
I have some problems sending an id though jquery. I have a form select
The select form component in grails can have the form: <g:select name=user.age from=${0..59} value=${age}
I have a dynamic dojo form in which I have a dijit.form.Select whose selected
I have a select form element with 5 options. If option 2 is selected
i have two dropdown list. first drop down:1 enter code here <form:select path=custName id=custName>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.