Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add IdentityErrorCode #14332

Closed
wants to merge 1 commit into from
Closed

Add IdentityErrorCode #14332

wants to merge 1 commit into from

Conversation

hishamco
Copy link
Member

While I'm working on #14331 , I notice there's no need for the magic string


public class IdentityErrorCode
{
public const string PasswordRequiresDigit = nameof(PasswordRequiresDigit);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't even agree with the technicality of these changes and using nameof everywhere because the day we decide to change the property name, even in casing, then it will break the underlying behavior or localization.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be fine if it was just public const string PasswordRequiresDigit = "PasswordRequiresDigit" but we don't even need it, the string is not used anywhere else, no need to synchronize them.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about creating private class? If No, you can close the PR

@hishamco hishamco closed this Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants