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

G4.80 May need a validator to check for "reasonably sanitized" inputs #80

Open
carolyncaron opened this issue May 29, 2024 · 0 comments
Labels
Group 4 - API | Services | Plugins Any issue related to developing an API (i.e. services + plugins)

Comments

@carolyncaron
Copy link
Contributor

carolyncaron commented May 29, 2024

Branch

Proposed branch name: g4.80-sanitizedInputValidator

Groups

Group 4 - API | Services | Plugins

Describe

It was discussed in person whether sanitization of input needed to occur, and to what extent, by the importers. To avoid making too many assumptions and to keep the control of standards in the hands of each data curator, we instead don't want to sanitize input, but provide feedback at the validation stage IF the input could cause potential confusion (for example, Plant Height vs. plant height could be considered a duplicate). Given feedback that a value might be too similar to another value already in the database, the curator can make their own judgement on whether the original value needs to change or the current input.

Design

To accomplish this, we propose a new validator to do the following checks on the specified input (for the Traits Importer specifically, we think this would apply to Trait Name, Method Short Name and Unit since this combination forms a unique trait):

  • Possibly check for invalid characters. Examples include: whitespace before/after, quotes, underscores, symbols such as /, @, %, etc...
    • The validator could accept an array parameter of invalid chars?
  • A "loose" search in the database for possible duplicates of cvterms (ex. specify in the query to search as case insensitive, maybe so far as allow 1 or 2 char mismatches)
@carolyncaron carolyncaron changed the title G4.[issueNo] May need a validator to check for "reasonably sanitized" inputs G4.80 May need a validator to check for "reasonably sanitized" inputs May 29, 2024
@laceysanderson laceysanderson added the Group 4 - API | Services | Plugins Any issue related to developing an API (i.e. services + plugins) label Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Group 4 - API | Services | Plugins Any issue related to developing an API (i.e. services + plugins)
Projects
None yet
Development

No branches or pull requests

2 participants