Password requirement not same as email regex c# -


i have mvc application code:

public class register { [regularexpression(@"^(?=.*\d)(?=.*[a-za-z]).{7,14}$", errormessage = "password not in      proper format")] public string password{ get; set; } } 

what validate password contain atleast 7-14 characters, atleast 1 number , 1 upper case letter.

another requirement should not same email address.

how can that? seems [compare(email)] not possible on scenario?

thanks in advance!

using mvc foolproof validation can write

[notequalto("emailaddress", errormessage="passwords must different emailaddress")] public string password{ get; set; } 

http://foolproof.codeplex.com/


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -