17 lines
407 B
JavaScript
17 lines
407 B
JavaScript
import { Field_Configuration } from '@efforting.tech/data/field-configuration';
|
|
|
|
|
|
function mandatory_anything(value) {
|
|
return value !== undefined;
|
|
}
|
|
|
|
|
|
const fc = new Field_Configuration('Some_Field', mandatory_anything, 'Anything defined');
|
|
|
|
|
|
console.log(fc.check_validation(undefined));
|
|
console.log(fc.check_validation(true));
|
|
|
|
//fc.validate(undefined);
|
|
fc.validate(undefined, 'New thingamabob object');
|