src/validation/index.js
function validateForm ( formMeta, formValue ) {
        var fields    = getOrNull( formMeta, 'fields' )
          , validable = reduce(function ( acc, fld, fldID ) {
                var noValidate = !t.isDefined( fld.validators ) 
                                 || fld.isHidden
                                 || fld.isReadOnly

                  , fldMeta  = {};

                if ( noValidate ) return acc;
                else {
                    fldMeta[ fldID ] = fld;
                    return t.merge( acc, fldMeta );
                }
            }, {}, fields );

        return validateFields( validable, formValue );
    }
function validateForm ( formMeta, formValue ) {
        var fields    = getOrNull( formMeta, 'fields' )
          , validable = reduce(function ( acc, fld, fldID ) {
                var noValidate = !t.isDefined( fld.validators ) 
                                 || fld.isHidden
                                 || fld.isReadOnly

                  , fldMeta  = {};

                if ( noValidate ) return acc;
                else {
                    fldMeta[ fldID ] = fld;
                    return t.merge( acc, fldMeta );
                }
            }, {}, fields );

        return validateFields( validable, formValue );
    }
function validateForm ( formMeta , formValue ) { var fields = getOrNull ( formMeta , 'fields' ) , validable = reduce ( function ( acc , fld , fldID ) { var noValidate = ! t . isDefined ( fld . validators ) || fld . isHidden || fld . isReadOnly , fldMeta = { } ; if ( noValidate ) return acc ; else { fldMeta [ fldID ] = fld ; return t . merge ( acc , fldMeta ) ; } } , { } , fields ) ; return validateFields ( validable , formValue ) ; }
Calculates form's validity by it's meta and value.
Wraps `validateFields` and filters array of fields
before validation.
@param {Object} formMeta - metadata in GeneratedForm format.
@param {Object} formValue - data in GeneratedForm format.
@returns {Object} - {
%fieldID%: [ %failed_validators% ],
...
}
Calculates form s validity by it s meta and value . Wraps validateFields and filters array of fields before validation .