import { e_ as e, a4 as t } from "./56c67d3b.js";
import "react";
import "react-dom";
test("textInputValidate", () => {
  expect(e({
    value: {
      value: "1"
    },
    required: !1,
    minLength: 0,
    maxLength: 0,
    validationType: "Regex",
    regex: /\d/,
    customRule: ""
  })).toMatchObject({
    validateStatus: ""
  }), expect(e({
    value: {
      value: "x"
    },
    required: !1,
    minLength: 0,
    maxLength: 0,
    validationType: "Regex",
    regex: /\d/,
    customRule: ""
  })).toMatchObject({
    validateStatus: "error",
    help: t("validationDesc.regex")
  }), expect(e({
    value: {
      value: ""
    },
    required: !0,
    minLength: 0,
    maxLength: 0,
    validationType: "Regex",
    regex: /\d/,
    customRule: ""
  })).toMatchObject({
    validateStatus: "error",
    help: t("prop.required")
  }), expect(e({
    value: {
      value: ""
    },
    required: !0,
    minLength: 0,
    maxLength: 0,
    validationType: "Regex",
    regex: /\d/,
    customRule: "test"
  })).toMatchObject({
    validateStatus: "error",
    help: "test"
  }), expect(e({
    value: {
      value: ""
    },
    required: !1,
    minLength: 3,
    maxLength: 0,
    validationType: "Regex",
    regex: /\d/,
    customRule: ""
  })).toMatchObject({
    validateStatus: "error",
    help: t("validationDesc.minLength", {
      length: 0,
      minLength: 3
    })
  }), expect(e({
    value: {
      value: "xxxx"
    },
    required: !1,
    minLength: 0,
    maxLength: 2,
    validationType: "Regex",
    regex: /\d/,
    customRule: ""
  })).toMatchObject({
    validateStatus: "error",
    help: t("validationDesc.maxLength", {
      length: 4,
      maxLength: 2
    })
  });
});
