@sikka/hawa 0.10.16-next → 0.10.17
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.
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5 -2
- package/dist/index.mjs +7 -3
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -7119,10 +7119,13 @@ var RegisterForm = function(_param) {
|
|
|
7119
7119
|
case "username":
|
|
7120
7120
|
fieldSchemas["username"] = z2.string({
|
|
7121
7121
|
required_error: texts === null || texts === void 0 ? void 0 : texts.usernameRequired
|
|
7122
|
+
}).min(1, {
|
|
7123
|
+
message: texts === null || texts === void 0 ? void 0 : texts.usernameRequired
|
|
7122
7124
|
}).refine(function(value) {
|
|
7123
|
-
|
|
7125
|
+
var isValid = /^[a-zA-Z][a-zA-Z0-9_-]{2,14}$/.test(value);
|
|
7126
|
+
return isValid;
|
|
7124
7127
|
}, {
|
|
7125
|
-
message: texts === null || texts === void 0 ? void 0 : texts.
|
|
7128
|
+
message: texts === null || texts === void 0 ? void 0 : texts.usernameInvalid
|
|
7126
7129
|
});
|
|
7127
7130
|
break;
|
|
7128
7131
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -7004,9 +7004,13 @@ var RegisterForm = ({ texts, ...props }) => {
|
|
|
7004
7004
|
fieldSchemas["email"] = z2.string({ required_error: texts?.emailRequiredText }).email({ message: texts?.emailInvalidText }).min(1, { message: texts?.emailRequiredText });
|
|
7005
7005
|
break;
|
|
7006
7006
|
case "username":
|
|
7007
|
-
fieldSchemas["username"] = z2.string({ required_error: texts?.usernameRequired }).
|
|
7008
|
-
|
|
7009
|
-
|
|
7007
|
+
fieldSchemas["username"] = z2.string({ required_error: texts?.usernameRequired }).min(1, { message: texts?.usernameRequired }).refine(
|
|
7008
|
+
(value) => {
|
|
7009
|
+
const isValid = /^[a-zA-Z][a-zA-Z0-9_-]{2,14}$/.test(value);
|
|
7010
|
+
return isValid;
|
|
7011
|
+
},
|
|
7012
|
+
{ message: texts?.usernameInvalid }
|
|
7013
|
+
);
|
|
7010
7014
|
break;
|
|
7011
7015
|
}
|
|
7012
7016
|
});
|
package/package.json
CHANGED