(
columnDefinition: SheetColumnDefinition,
{ skipConditionCheck }: { skipConditionCheck?: boolean } = {}
)
| 15 | import { extractReferenceColumnPossibleValues } from '../sheet/utils'; |
| 16 | |
| 17 | export function fieldIsRequired( |
| 18 | columnDefinition: SheetColumnDefinition, |
| 19 | { skipConditionCheck }: { skipConditionCheck?: boolean } = {} |
| 20 | ) { |
| 21 | if (columnDefinition.validators && columnDefinition.validators.length > 0) { |
| 22 | const isRequired = columnDefinition.validators.find( |
| 23 | (v) => v.validate === 'required' |
| 24 | ); |
| 25 | return ( |
| 26 | isRequired != null && |
| 27 | (skipConditionCheck |
| 28 | ? true |
| 29 | : (isRequired as RequiredValidatorDefinition).when == null) |
| 30 | ); |
| 31 | } |
| 32 | return false; |
| 33 | } |
| 34 | |
| 35 | function automaticFieldValidators( |
| 36 | columnDefinition: SheetColumnDefinition, |
no outgoing calls
no test coverage detected