import { textInputValidate as e } from "./41aba172.js";
import { Y as t } from "./603b75d9.js";
import "react";
import "./f9847c56.js";
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
    })
  });
});
