-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
GUID generated by Sql Server doesn't pass validation #4251
Comments
Looking into it: We have regEx to trigger that message !/^[{(]?[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}[)}]?$/.test("6ffefd8e-a018-e811-bbf9-60f67727d806")
true
!/^[{(]?[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}[)}]?$/.test("8f25150a-cc88-455a-852b-27c1a86972e2")
false |
Here are some details from http://guid.us/
If we strictly follow that your GUID does not comply: But I guess I should allow any possible GUID in the UI and let the backend be more restrictive... |
Locking due to inactivity. This is done to avoid resurrecting old issues and bumping long threads with new, possibly unrelated content. If you think you're experiencing something similar to what you've found here: please open a new issue, follow the template, and reference this issue in your report. Thanks! |
Demonstration API definition
Expected Behavior
6ffefd8e-a018-e811-bbf9-60f67727d806 should be recognized as a valid GUID when used as a parameter. This GUID was generated by SQL Server and should regarded as valid.
Current Behavior
The following error is produced: "Value must be a Guid"
Possible Solution
In utils.js in the method validateGuid(val) the RegEx could be changed to allow [0-9a-f] for all characters. Currently there are restrictions to the first character in both of the character-groups 3 and 4
The text was updated successfully, but these errors were encountered: