@azure-net/kit 2.2.1 → 2.2.2

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.
@@ -286,10 +286,10 @@ export const createRules = (validationMessages) => {
286
286
  const required = (params) => {
287
287
  const { message, byCondition } = { ...params, message: params?.message ?? validationMessages.required };
288
288
  return ({ val, listValues, key }) => {
289
- if (!checkVal(val))
290
- return message();
291
289
  if (byCondition && !byCondition({ val, listValues, key }))
292
290
  return undefined;
291
+ if (!checkVal(val))
292
+ return message();
293
293
  if (typeof val === 'string' && !val.length)
294
294
  return message();
295
295
  if (val instanceof File && val.size < 1)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure-net/kit",
3
- "version": "2.2.1",
3
+ "version": "2.2.2",
4
4
  "files": [
5
5
  "dist",
6
6
  "!dist/**/*.test.*",