File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
frontend/src/views/CONSEP/TestingActivities/TestSearch Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,8 @@ import {
4343 minStartDate ,
4444 maxEndDate ,
4545 formatExportData ,
46- columnVisibilityLocalStorageKey
46+ columnVisibilityLocalStorageKey ,
47+ isFamilyLot
4748} from './constants' ;
4849import { THREE_HALF_HOURS , THREE_HOURS } from '../../../../config/TimeUnits' ;
4950import {
@@ -322,7 +323,7 @@ const TestSearch = () => {
322323 } ;
323324 }
324325
325- const isFamily = lot . toUpperCase ( ) . startsWith ( 'F' ) ;
326+ const isFamily = isFamilyLot ( lot ) ;
326327 const limit = isFamily ? 13 : 5 ;
327328 return lot . length > limit
328329 ? {
@@ -364,8 +365,7 @@ const TestSearch = () => {
364365 lotNumbers : validationResults
365366 } ) ) ;
366367 // Auto-tab to next input if current input is valid and has reached max length
367- const isFamily = sanitizedValue . toUpperCase ( ) . startsWith ( 'F' ) ;
368- const maxLength = isFamily ? 13 : 5 ;
368+ const maxLength = isFamilyLot ( sanitizedValue ) ? 13 : 5 ;
369369
370370 if (
371371 ! validationResults [ index ] . error
You can’t perform that action at this time.
0 commit comments