ValidationExpression="^.*(?=.{7,})(?=.[a-zA-Z])(?=.*[\d])(?=.*[\W]).*$"

This is the expression for the password,

  1. At Least 7
  2. Alphanumeric required
  3. Special Characters

But can i check the textbox must not be empty other than using RequireFieldValidator..
Due to i going to apply Ajax ValidatorCallOutExtender, is hardly to display both validator..

you can use javascript and check the inputElem.value.length > 0
you can use PHP to check isset($_POST['pw']); //validates false if empty

lastly, you can use ^$ to match an empty string...

I hope that helps...

Ryan

can provide a example? Thanks

I got another idea already,
but i put as default displaying of the RequiredFieldValidator
Ajax_ValidatorCallOutExtender will apply for other than RequiredFieldValidator.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.