umt 1.3.5 → 1.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,7 @@
1
1
  export * from "./core";
2
+ export * from "./email";
2
3
  export * from "./length";
3
4
  export * from "./minLength";
4
5
  export * from "./maxLength";
6
+ export * from "./numberString";
7
+ export * from "./uuid";
@@ -1,5 +1,8 @@
1
1
  export * from "./core";
2
+ export * from "./email";
2
3
  export * from "./length";
3
4
  export * from "./minLength";
4
5
  export * from "./maxLength";
6
+ export * from "./numberString";
7
+ export * from "./uuid";
5
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Validate/string/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Validate/string/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { ValidateReturnType } from "../../Validate/type";
2
+ export declare const uuid: (versions?: (1 | 2 | 3 | 4 | 5)[], message?: string) => ValidateReturnType<string>;
@@ -0,0 +1,12 @@
1
+ export const uuid = (versions = [4], message) => ({
2
+ type: "string",
3
+ message,
4
+ validate: (value) => {
5
+ return versions.some((version) => {
6
+ // バージョンごとの正規表現
7
+ const versionRegex = new RegExp(`^[\\da-f]{8}-?[\\da-f]{4}-?${version}[\\da-f]{3}-?[89ab][\\da-f]{3}-?[\\da-f]{12}$`, "i");
8
+ return versionRegex.test(value);
9
+ });
10
+ },
11
+ });
12
+ //# sourceMappingURL=uuid.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uuid.js","sourceRoot":"","sources":["../../../src/Validate/string/uuid.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,IAAI,GAAG,CAClB,WAAkC,CAAC,CAAC,CAAC,EACrC,OAAgB,EACY,EAAE,CAAC,CAAC;IAChC,IAAI,EAAE,QAAQ;IACd,OAAO;IACP,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;QAClB,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE;YAC/B,eAAe;YACf,MAAM,YAAY,GAAG,IAAI,MAAM,CAC7B,8BAA8B,OAAO,+CAA+C,EACpF,GAAG,CACJ,CAAC;YACF,OAAO,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAClC,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAC,CAAC"}
package/package.json CHANGED
@@ -54,5 +54,5 @@
54
54
  "format": "biome format . --write",
55
55
  "eslint": "eslint src"
56
56
  },
57
- "version": "1.3.5"
57
+ "version": "1.3.6"
58
58
  }