@payfit/unity-components
Version:
9 lines (8 loc) • 441 B
TypeScript
import { StandardSchema } from '../../../types/schema.js';
/**
* Determines if a field is required based on its path in a schema
* @param schema - The schema adapter object
* @param fieldPath - The path to the field (e.g., "preferences.marketing")
* @returns true if the field is required, false if optional or not found
*/
export declare function isFieldRequired(schema: StandardSchema | null | undefined, fieldPath: string): boolean;