@saas-ui/forms 2.6.0 → 2.6.2

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.mjs CHANGED
@@ -530,7 +530,8 @@ var useBaseField = (props) => {
530
530
  };
531
531
  var BaseField = (props) => {
532
532
  const { controlProps, label, help, hideLabel, error } = useBaseField(props);
533
- return /* @__PURE__ */ jsxs5(FormControl2, { ...controlProps, isInvalid: !!error, children: [
533
+ const isInvalid = !!error || controlProps.isInvalid;
534
+ return /* @__PURE__ */ jsxs5(FormControl2, { ...controlProps, isInvalid, children: [
534
535
  label && !hideLabel ? /* @__PURE__ */ jsx10(FormLabel2, { children: label }) : null,
535
536
  /* @__PURE__ */ jsxs5(Box, { children: [
536
537
  props.children,