Liferay.Loader.define("@liferay/object-web@1.0.153/js/components/ObjectValidation/useObjectValidationForm",["module","exports","require","@liferay/object-js-components-web"],(function(e,i,a){window;{Object.defineProperty(i,"__esModule",{value:!0}),i.useObjectValidationForm=function useObjectValidationForm({initialValues:i,onSubmit:a}){const{errors:t,handleChange:o,handleSubmit:r,setValues:l,values:u}=(0,n.useForm)({initialValues:i,onSubmit:a,validate:i=>{var a,t;const o={},r=null===(a=i.name)||void 0===a?void 0:a[e],l=null===(t=i.errorLabel)||void 0===t?void 0:t[e],u=i.script;return(0,n.invalidateRequired)(r)&&(o.name=n.REQUIRED_MSG),(0,n.invalidateRequired)(l)&&(o.errorLabel=n.REQUIRED_MSG),(0,n.invalidateRequired)(u)&&(o.script=n.REQUIRED_MSG),"groovy"===i.engine&&i.lineCount&&i.lineCount>2987&&(o.script=Liferay.Language.get("the-maximum-number-of-lines-available-is-2987")),o}});return{errors:t,handleChange:o,handleSubmit:r,setValues:l,values:u}};var n=a("@liferay/object-js-components-web");const e=Liferay.ThemeDisplay.getDefaultLanguageId()}}));
//# sourceMappingURL=useObjectValidationForm.js.map