Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dates and nuts
Message
De
14/09/2001 10:39:16
 
 
À
14/09/2001 10:24:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00556454
Message ID:
00556464
Vues:
13
Validate it on the client or server side?

I guess client side (browser) would be appropriate. If you use VBScript then IsDate() is the way to go. It will accept a number of short and long date formats (in a string expression) and return True if the date is valid. After you verify that it is a valid date you can format it before sending it to the server with the Format() function.

HTH

>I need to validate web data which is by default type string. The fields which are most difficult to validate are DATE type. I have written code over the years to validate such strings but I never felt satisfied that I was thorough. does anyone have any code suggestions for this validation. what I am interested in is strictly a valid date.
>
>9/14/01
>09/14/01
>09/14/2001
>01/14/09
>09-14-01
>09-14-2001
>09.14.01
>
>and on and on
>
>Thanks
>
>Glenn
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform