opti-form
Version:
Form logic for React with immutable controls and value
17 lines • 804 B
TypeScript
import { TControlExternalErrorFlat } from '../TControlExternalErrorFlat';
import { TControlDataObject } from '../control-data';
import { TControlCustomError } from '../types';
import { TControlObjectValue } from '../values';
export declare class CustomErrorHandler<Value extends TControlObjectValue> {
private readonly rootField;
constructor(rootField: TControlDataObject<Value, any>);
/**
* This whole overcomplicated logic is required in case come genius names object's property like baz[1]inga or baz.in.ga
*/
getCustomErrorsFromFlatList(flatErrors: TControlExternalErrorFlat[]): TControlCustomError[];
private fillFlatErrorsByField;
private getChildrenRegexp;
private getChild;
private getRemainingFlatPath;
}
//# sourceMappingURL=CustomErrorHandler.d.ts.map