If you are worried about the correct format, you may want to use a selection option, that way you can handle the format easier, trying to have them input the correct format, may cause some bad data to be entered. Let's face no matter how smart we think we are as developers. The user can always come up with weird scenarios and may end up figuring out a way to enter bad data into your form. Also, in some cases JavaScript is turned off what happens then, do you have a backup plan? You should use a server-side language to do this, so the client can't turn off your validation if you need to use a text field for the date.
If you are worried about the correct format, you may want to use a selection option, that way you can handle the format easier, trying to have them input the correct format, may cause some bad data to be entered. Let's face no matter how smart we think we are as developers. The user can always come up with weird scenarios and may end up figuring out a way to enter bad data into your form. Also, in some cases JavaScript is turned off what happens then, do you have a backup plan? You should use a server-side language to do this, so the client can't turn off your validation if you need to use a text field for the date.
really thanks for your suggestions. However, I am doing my homework.. so ... this is what my teacher ask me to do- something about regular expression, SAD...
Bookmarks