react-asc 25.2.9 → 25.2.11
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 +1 @@
|
|
|
1
|
-
export declare const IsEmptyValidator: (value:
|
|
1
|
+
export declare const IsEmptyValidator: (value: string) => boolean;
|
package/index.es.js
CHANGED
|
@@ -1170,7 +1170,9 @@ const FormError = (props) => {
|
|
|
1170
1170
|
React.createElement("div", { className: className }, errors.map(e => React.createElement("div", { key: e.validator }, e.message)))));
|
|
1171
1171
|
};
|
|
1172
1172
|
|
|
1173
|
-
const IsEmptyValidator = (value) => value
|
|
1173
|
+
const IsEmptyValidator = (value) => value?.trim() === ''
|
|
1174
|
+
|| value === null
|
|
1175
|
+
|| value === undefined;
|
|
1174
1176
|
|
|
1175
1177
|
const EmailValidator = (value) => {
|
|
1176
1178
|
const isInvalidEmailFormat = value.match(/^([\w.%+-]+)@([\w-]+\.)+([\w]{2,})$/i) === null;
|
package/index.js
CHANGED
|
@@ -1179,7 +1179,9 @@ const FormError = (props) => {
|
|
|
1179
1179
|
React__default["default"].createElement("div", { className: className }, errors.map(e => React__default["default"].createElement("div", { key: e.validator }, e.message)))));
|
|
1180
1180
|
};
|
|
1181
1181
|
|
|
1182
|
-
const IsEmptyValidator = (value) => value
|
|
1182
|
+
const IsEmptyValidator = (value) => value?.trim() === ''
|
|
1183
|
+
|| value === null
|
|
1184
|
+
|| value === undefined;
|
|
1183
1185
|
|
|
1184
1186
|
const EmailValidator = (value) => {
|
|
1185
1187
|
const isInvalidEmailFormat = value.match(/^([\w.%+-]+)@([\w-]+\.)+([\w]{2,})$/i) === null;
|