Skip to content

Commit

Permalink
change penLocalIdName regex
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmcdermid committed Jul 24, 2024
1 parent 1086b29 commit cc5890f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions backend/src/components/studentFilters.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,12 @@ function createMoreFiltersSearchCriteria(searchFilter = []) {
// pValue consists only of numbers
let penCriteria = createLocalIdPenSearchCriteria(pValue.toString());
penLocalIdNameFilter.push(...penCriteria);
} else if (/^[a-zA-Z]+$/.test(pValue)) {
// pValue consists only of alphabetical characters
} else if (/^[a-z\-.'\s]+$/i.test(pValue)) {
// pValue consists only of alphabetical characters and allowed name characters
let nameCriteria = createMultiFieldNameSearchCriteria(pValue.toString());
penLocalIdNameFilter.push(...nameCriteria);
} else if (/^[a-zA-Z0-9]+$/.test(pValue)) {
// pValue contains both numbers and alphabetical characters
} else {
// pValue contains both numbers and alphabetical characters or unknown characters
let nameCriteria = createMultiFieldNameSearchCriteria(pValue.toString());
let penCriteria = createLocalIdPenSearchCriteria(pValue.toString());
penLocalIdNameFilter.push(...nameCriteria, ...penCriteria);
Expand Down

0 comments on commit cc5890f

Please sign in to comment.