lib/form/validated-form.js
/**
 * A utility wrapper over Reactstrap FormGroup + Label + ValidatedInput
 * that uses react-hook-form data to show error message and error/validated styles.
 * This component can be used with ValidatedForm
 *
 * @param ValidatedFieldProps
 * @returns JSX.Element
 */
A utility wrapper over Reactstrap FormGroup + Label + ValidatedInput
that uses react-hook-form data to show error message and error/validated styles.
This component can be used with ValidatedForm


A utility wrapper over Reactstrap FormGroup + Label + ValidatedInput that uses react - hook - form data to show error message and error / validated styles . This component can be used with ValidatedForm
function ValidatedField(_a) {
    var { children, name, id, disabled, className, check, row, col, tag, label, labelClass, labelHidden, inputClass, inputTag, hidden } = _a, attributes = (0, tslib_1.__rest)(_a, ["children", "name", "id", "disabled", "className", "check", "row", "col", "tag", "label", "labelClass", "labelHidden", "inputClass", "inputTag", "hidden"]);
    const input = (react_1.default.createElement(ValidatedInput, Object.assign({ name: name, id: id, disabled: disabled, className: inputClass, hidden: hidden, tag: inputTag }, attributes), children));
    const inputRow = row ? react_1.default.createElement(reactstrap_1.Col, Object.assign({}, col), input) : input;
    return (react_1.default.createElement(reactstrap_1.FormGroup, { check: check, disabled: disabled, row: row, className: className, hidden: hidden, tag: tag },
        check && inputRow,
        label && (react_1.default.createElement(reactstrap_1.Label, { id: `${name}Label`, check: check, for: id, className: labelClass, hidden: labelHidden || hidden }, label)),
        !check && inputRow));
}
function ValidatedField ( _a ) { var { children , name , id , disabled , className , check , row , col , tag , label , labelClass , labelHidden , inputClass , inputTag , hidden } = _a , attributes = ( 0 , tslib_1 . __rest ) ( _a , [ "children" , "name" , "id" , "disabled" , "className" , "check" , "row" , "col" , "tag" , "label" , "labelClass" , "labelHidden" , "inputClass" , "inputTag" , "hidden" ] ) ; const input = ( react_1 . default . createElement ( ValidatedInput , Object . assign ( { name : name , id : id , disabled : disabled , className : inputClass , hidden : hidden , tag : inputTag } , attributes ) , children ) ) ; const inputRow = row ? react_1 . default . createElement ( reactstrap_1 . Col , Object . assign ( { } , col ) , input ) : input ; return ( react_1 . default . createElement ( reactstrap_1 . FormGroup , { check : check , disabled : disabled , row : row , className : className , hidden : hidden , tag : tag } , check && inputRow , label && ( react_1 . default . createElement ( reactstrap_1 . Label , { id : ` ${ name } ` , check : check , for : id , className : labelClass , hidden : labelHidden || hidden } , label ) ) , ! check && inputRow ) ) ; }
A utility wrapper over Reactstrap FormGroup + Label + ValidatedInput
 that uses react-hook-form data to show error message and error/validated styles.
A utility wrapper over Reactstrap FormGroup + Label + ValidatedInput that uses react - hook - form data to show error message and error / validated styles .