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