# How to change login validation rule?

**URL:** <https://devforum.okta.com/t/how-to-change-login-validation-rule/779>\
**Category:** Questions\
**Created:** [November 18, 2017, 7:37am UTC](https://devforum.okta.com/t/how-to-change-login-validation-rule/779 "2017-11-18T07:37:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhaoyi0113](https://avatars.discourse-cdn.com/v4/letter/z/e8c25b/32.png) [@zhaoyi0113](https://devforum.okta.com/u/zhaoyi0113)\
**Post date:** [November 18, 2017, 7:37am UTC](https://devforum.okta.com/t/how-to-change-login-validation-rule/779/1 "2017-11-18T07:37:11Z")

</div>

I am using Okta restful API “{{url}}/api/v1/users?activate=true” to create a user account. I need to fill in some required parameters like login, firstName, lastName, email etc. The “login” is used as Primary Authentication username. But it requires email format. If not, I will get this error response: “login: User name must be in the form of an email address (e.g. [bob@nowhere.com](mailto:bob@nowhere.com))”, How can I change the login validation rule to be a general username not an email address. There is an email attribute on the registration, so no point to keep another email format attribute.

---

<div class="post-metadata">

**Author:** ![Govner](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/govner/32/1099_2.png) [@Govner](https://devforum.okta.com/u/Govner)\
**Post date:** [April 29, 2019, 2:18pm UTC](https://devforum.okta.com/t/how-to-change-login-validation-rule/779/2 "2019-04-29T14:18:25Z")

</div>

Under Directory\>Profile Editor modify the Okta profile as highlighted:

![image](https://global.discourse-cdn.com/oktadev/original/2X/4/4d6533c477ee8ae52f9c21c1b8b33aa1253cc2d0.png)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [January 17, 2024, 11:27pm UTC](https://devforum.okta.com/t/how-to-change-login-validation-rule/779/3 "2024-01-17T23:27:45Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
