Make email not required for a user in the UI.

It's already not required in the API.
This commit is contained in:
Bill Nottingham 2021-02-22 13:28:03 -05:00
parent 0f6d2c36a0
commit fb07be36b5
2 changed files with 3 additions and 4 deletions

View File

@ -11,7 +11,7 @@ import FormField, {
FormSubmitError,
} from '../../../components/FormField';
import OrganizationLookup from '../../../components/Lookup/OrganizationLookup';
import { required, requiredEmail } from '../../../util/validators';
import { required } from '../../../util/validators';
import { FormColumnLayout } from '../../../components/FormLayout';
function UserFormFields({ user, i18n }) {
@ -76,8 +76,7 @@ function UserFormFields({ user, i18n }) {
id="user-email"
label={i18n._(t`Email`)}
name="email"
validate={requiredEmail(i18n)}
isRequired
type="text"
/>
{!ldapUser && !(socialAuthUser && externalAccount) && (
<>

View File

@ -258,7 +258,7 @@ export const User = shape({
username: string,
first_name: string,
last_name: string,
email: string.isRequired,
email: string,
is_superuser: bool,
is_system_auditor: bool,
ldap_dn: string,