Information générale
Catégorie:
Codage, syntaxe et commandes
Is this an ASP based web site? If so, then maybe IsDate() can still be of help there, before sending the data to the COM server / database.
>I need validation on the SERVER side, and I do not use VBScript because this is a public website which may use browsers which do not support VBScrip and may not allow scripting at all.
>
>Thanks
>
>Glenn
>
>>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
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement