import { AbstractControl, ValidationErrors, ValidatorFn } from "@angular/forms"; export const CONSTANTS = { POR_ORGACODE: '0005', }; export const pageSizeOptions = [ { label: '5 items', value: 5 }, { label: '10 items', value: 10 }, { label: '20 items', value: 20 } ]; export const toDateAfterFromDateValidator: ValidatorFn = ( group: AbstractControl ): ValidationErrors | null => { const fromDate = group.get('fromDate')?.value; const toDate = group.get('toDate')?.value; if (!fromDate || !toDate) { return null; } return toDate >= fromDate ? null : { toDateInvalid: true }; };