Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. asp.net validaton methods

asp.net validaton methods

Scheduled Pinned Locked Moved ASP.NET
questioncsharpasp-net
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • X Offline
    X Offline
    xiaowenjie
    wrote on last edited by
    #1

    hey, i need to do form validation. need to check if fields are empty,valid email format, postal code n things like this.. how can i integrate requiredFormValidaton and regularExpression in such it will inform user if its empty n once it is filled in but input wrongly, it will only inform user of incorrect input?

    C 1 Reply Last reply
    0
    • X xiaowenjie

      hey, i need to do form validation. need to check if fields are empty,valid email format, postal code n things like this.. how can i integrate requiredFormValidaton and regularExpression in such it will inform user if its empty n once it is filled in but input wrongly, it will only inform user of incorrect input?

      C Offline
      C Offline
      Chetan Ranpariya
      wrote on last edited by
      #2

      You can use more than one type of validation controls for one controls. Example: You use requiredfieldvalidator for the textbox for zipcode which check if the textbox value is empty. and to check the format of zipcode value you use regularexpression validator control which will check the format of the zipcode value. Now whenever validation occurs first requiredfieldvalidator will work. If the controls is not having blank value then the regularexpressionvalidator will check the format of value and gives u error if format is not in proper way. Thanks and regards, Chetan Ranpariya.

      X 1 Reply Last reply
      0
      • C Chetan Ranpariya

        You can use more than one type of validation controls for one controls. Example: You use requiredfieldvalidator for the textbox for zipcode which check if the textbox value is empty. and to check the format of zipcode value you use regularexpression validator control which will check the format of the zipcode value. Now whenever validation occurs first requiredfieldvalidator will work. If the controls is not having blank value then the regularexpressionvalidator will check the format of value and gives u error if format is not in proper way. Thanks and regards, Chetan Ranpariya.

        X Offline
        X Offline
        xiaowenjie
        wrote on last edited by
        #3

        gd afternoon, tks. But how will i format the validator for display purposes? i cant overlap the 2 validator am i right?

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups