-
Notifications
You must be signed in to change notification settings - Fork 899
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 basic validation to database names #23842
Conversation
Where did the 20 character limit come from? According to the CREATE DATABASE docs the name limit is 128 characters. https://learn.microsoft.com/en-us/sql/t-sql/statements/create-database-transact-sql?view=sql-server-ver16&tabs=sqlpool#database_name |
Non-alphanumeric values are also allowed, since I was just able to make a database called "@#)(&" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also attach screenshots/gif showing the behavior and different validation errors (make sure to include the OK button in them so we can make sure it's being enabled/disabled correctly)
@Charles-Gagnon- I added a screenshot for empty values. If the max length is over the limit, then it won't let the user type anymore. |
this.objectInfo.name = this.nameInput.value; | ||
await this.runValidation(false); | ||
}); | ||
}, props); | ||
containers.push(this.createLabelInputContainer(localizedConstants.NameText, this.nameInput)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should also be marked as required so it displays in the UI (* next to the label)
Co-authored-by: Cory Rivera <corivera@microsoft.com>
Co-authored-by: Cory Rivera <corivera@microsoft.com> Co-authored-by: Cory Rivera <corivera@microsoft.com>
Add basic dynamic validation for database names:
For #23823
For #23822