diff --git a/striker-ui/lib/test_input/buildDomainTestBatch.tsx b/striker-ui/lib/test_input/buildDomainTestBatch.tsx index f7d4a23c..dad7374a 100644 --- a/striker-ui/lib/test_input/buildDomainTestBatch.tsx +++ b/striker-ui/lib/test_input/buildDomainTestBatch.tsx @@ -6,10 +6,11 @@ import { InlineMonoText } from '../../components/Text'; const buildDomainTestBatch: BuildInputTestBatchFunction = ( inputName, onSuccess, - { onFinishBatch, ...defaults } = {}, + { isRequired, onFinishBatch, ...defaults } = {}, onDomainTestFailure, ) => ({ defaults: { ...defaults, onSuccess }, + isRequired, onFinishBatch, tests: [ { diff --git a/striker-ui/lib/test_input/buildIPAddressTestBatch.tsx b/striker-ui/lib/test_input/buildIPAddressTestBatch.tsx index b8edddd7..418fb322 100644 --- a/striker-ui/lib/test_input/buildIPAddressTestBatch.tsx +++ b/striker-ui/lib/test_input/buildIPAddressTestBatch.tsx @@ -5,10 +5,11 @@ import testNotBlank from './testNotBlank'; const buildIPAddressTestBatch: BuildInputTestBatchFunction = ( inputName, onSuccess, - { onFinishBatch, ...defaults } = {}, + { isRequired, onFinishBatch, ...defaults } = {}, onIPv4TestFailure, ) => ({ defaults: { ...defaults, onSuccess }, + isRequired, onFinishBatch, tests: [ { diff --git a/striker-ui/lib/test_input/buildNumberTestBatch.tsx b/striker-ui/lib/test_input/buildNumberTestBatch.tsx index 5a5d0447..846a5138 100644 --- a/striker-ui/lib/test_input/buildNumberTestBatch.tsx +++ b/striker-ui/lib/test_input/buildNumberTestBatch.tsx @@ -4,7 +4,7 @@ import toNumber from '../toNumber'; const buildNumberTestBatch: BuildInputTestBatchFunction = ( inputName, onSuccess, - { onFinishBatch, ...defaults } = {}, + { isRequired, onFinishBatch, ...defaults } = {}, onIntTestFailure?, onFloatTestFailure?, onRangeTestFailure?, @@ -48,6 +48,7 @@ const buildNumberTestBatch: BuildInputTestBatchFunction = ( return { defaults: { ...defaults, onSuccess }, + isRequired, onFinishBatch, tests, }; diff --git a/striker-ui/lib/test_input/buildPeacefulStringTestBatch.tsx b/striker-ui/lib/test_input/buildPeacefulStringTestBatch.tsx index 93c3cfbf..594f387e 100644 --- a/striker-ui/lib/test_input/buildPeacefulStringTestBatch.tsx +++ b/striker-ui/lib/test_input/buildPeacefulStringTestBatch.tsx @@ -6,10 +6,11 @@ import { InlineMonoText } from '../../components/Text'; const buildPeacefulStringTestBatch: BuildInputTestBatchFunction = ( inputName, onSuccess, - { onFinishBatch, ...defaults } = {}, + { isRequired, onFinishBatch, ...defaults } = {}, onTestPeacefulStringFailureAppend, ) => ({ defaults: { ...defaults, onSuccess }, + isRequired, onFinishBatch, tests: [ { diff --git a/striker-ui/lib/test_input/buildUUIDTestBatch.tsx b/striker-ui/lib/test_input/buildUUIDTestBatch.tsx index f417f548..d5173fbf 100644 --- a/striker-ui/lib/test_input/buildUUIDTestBatch.tsx +++ b/striker-ui/lib/test_input/buildUUIDTestBatch.tsx @@ -5,10 +5,11 @@ import testNotBlank from './testNotBlank'; const buildUUIDTestBatch: BuildInputTestBatchFunction = ( inputName, onSuccess, - { onFinishBatch, ...defaults } = {}, + { isRequired, onFinishBatch, ...defaults } = {}, onUUIDTestFailure, ) => ({ defaults: { ...defaults, onSuccess }, + isRequired, onFinishBatch, tests: [ { diff --git a/striker-ui/types/TestInputFunction.d.ts b/striker-ui/types/TestInputFunction.d.ts index 0cf81cb4..a8f5ce63 100644 --- a/striker-ui/types/TestInputFunction.d.ts +++ b/striker-ui/types/TestInputFunction.d.ts @@ -65,7 +65,8 @@ type InputTestBatch = { type BuildInputTestBatchFunction = ( inputName: string, onSuccess: InputTestSuccessCallback, - options?: InputTestBatch['defaults'] & Pick, + options?: InputTestBatch['defaults'] & + Pick, ...onFailureAppends: InputTestFailureAppendCallback[] ) => InputTestBatch;