Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8453899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:52:56+00:00 2026-06-10T11:52:56+00:00

how can I check for a regular expression (email) and make sure the field

  • 0

how can I check for a regular expression (email) and make sure the field in a form is non-empty at the same time?
if I leave it to regular expression only, it accepts empty strings
if I place two validators, it takes the space for two labels, and sometimes both errors show next to each other, i only want one label for the error
thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T11:52:58+00:00Added an answer on June 10, 2026 at 11:52 am

    Use a RequiredFieldValidator and the RegularExpressionValidator and set Display to Dynamic, then it won’t take two spaces.

    Dynamic:
    Space for the validation message is dynamically added to the page if validation fails.

    In general it’s a good idea to use two validators because you can provide two meaningful error-messages (“Please enter email” or “… must be a valid email”).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I’m trying to make a html5 form that contains one email input, one check
can someone please help me to compose a regular expression to check an alphanumeric
can someone please help me to compose a regular expression to check a currency
I'd like to implement a RegExp (regular expression) that can check a string to
can some one give me the Regular Expression that can check if a given
can anyone tell me the regular expression to check whether the entered number is
can someone tell me the regular expression which will check if value is 0.0
Hey Looking for a regular expression which I can use to check for valid
I am looking for a regular-expression which can be used to check a postal
using a regular expression in PHP with preg_replace_callback how can I check if two

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.