Base solution for your next web application
Open Closed

How can I make the email field not required in user creation? #9875


User avatar
0
auphara5 created

I made the user name unique for all tenants and modified the login process to be by user name or phone number.

How can I make the email field not required in user creation?


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    There 3 places you need to make EmailAddress not required.

    1. Database (Entity): In order to do this, you can use fluent configuration and make NormalizedEmailAddress and EmailAddress fields not required in OnModelCreating of your DbContext.
    2. DTOs: You also need to make EmailAddress field not required in Register and Create/Edit DTOs (or view models in some cases depending on your project type).
    3. UI: You also need to make UI input elements not required as well in the related pages.