Validation
If one of the data doesn't meet the validation rules, the "Save" button is disabled.
import React from 'react';
import { VirtualTable, validation as validationHelper } from '@myunisoft/design-system';
const { validate, pipe, required, min } = validationHelper;
const validationRules = {
name: pipe(required()),
firstname: pipe(required()),
age: pipe(required(), min(18))
};
const yourComponent = () => {
return (
<VirtualTable
data={...}
config={...}
validationRules={validationRules}
/>
)
};
export default yourComponent;