asp.net mvc - Email edit prevent duplicates -


i'm using built in authentication in app , have set manager role can create new accounts, assigning username , email. have edited registermodel inner class of accountmodels add regex ensure email valid email , works well.

however, when comes editing existing users email, run trouble. how validate new email valid email? , user not have email? know how regex go? , add remote call check duplicates again put stuff? seems wrong checking duplicates in controller.

thanks time,

jay

try this:

<membership>       <providers>         <clear/>         <add name="aspnetsqlmembershipprovider"               type="system.web.security.sqlmembershipprovider"               ...               requiresuniqueemail="true"              ... />       </providers>     </membership> 

Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -