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

Validation for QID input field #710

Open
annefitzatomic opened this issue Nov 13, 2024 · 0 comments
Open

Validation for QID input field #710

annefitzatomic opened this issue Nov 13, 2024 · 0 comments

Comments

@annefitzatomic
Copy link

User Story
As someone adding a wikidata item, I don't want to be able to enter an invalid QID for a category.

Acceptance Criteria*

  • Confirm the validation pattern below and apply this if correct (this came from ChatGPT)
  1. Check for a “Q” Prefix: Ensure that the input begins with an uppercase “Q”.
  2. Only Digits After “Q”: The characters after “Q” should consist solely of digits.
  3. Minimum Length: The shortest possible QID is “Q1”, so ensure a minimum length of 2 characters.
  4. Reasonable Maximum Length: Wikidata’s QID numbers have not yet exceeded 8 digits (as of 2023). Setting an upper limit, such as 12 characters (1 “Q” + up to 11 digits), will allow room for growth without being excessively large.
  5. Case Sensitivity: Ensure that the “Q” is uppercase, as lowercase “q” is invalid.
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

No branches or pull requests

1 participant