Validating form fields

Results 1 to 3 of 3

Thread: Validating form fields

  1. #1
    polarbear Guest

    Default Validating form fields

    Hi,<BR><BR>I will like to validate that a form field contains only numerical input and no letters, punctuation or special characters. How can I check this?<BR><BR>Thank you for your reply.

  2. #2
    Ryne Guest

    Default RE: Validating form fields

    I think what you&#039re trying to do is something like this :<BR>----------------------------------------------------<BR>Dim str<BR>str=Request.Form("fieldname")<BR>if IsNumeric(str) then<BR> Response.Write "Yes, this is a numerical input"<BR>else<BR> Response.Write "No, this is not a numerical input"<BR>end if<BR>----------------------------------------------------<BR>IsNumeric function will return "true" if string can be converted into numerical data type.

  3. #3
    Ramakrishna Guest

    Default RE: Validating form fields using Javascript

    u can use isNan function to check whether the value entered is number or not and validate accordingly.<BR>let me know if any problems.<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