@rxap/forms 12.5.1-alpha.0 → 12.5.1-next.3

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.
@@ -2949,7 +2949,7 @@
2949
2949
  if (control.value === null) {
2950
2950
  return null;
2951
2951
  }
2952
- if (!isNumber(control.value, options)) {
2952
+ if (!isNumber(!(options === null || options === void 0 ? void 0 : options.strict) && typeof control.value === 'string' ? Number(control.value) : control.value, options)) {
2953
2953
  return {
2954
2954
  isNumber: {
2955
2955
  expected: 'A number value',
@@ -3260,6 +3260,25 @@
3260
3260
  };
3261
3261
  }
3262
3262
 
3263
+ function IsIP(_a) {
3264
+ var _b = _a === void 0 ? {} : _a, message = _b.message, version = _b.version;
3265
+ return function (control) {
3266
+ if (control.value === null) {
3267
+ return null;
3268
+ }
3269
+ if (!(typeof control.value === 'string' && validator.isIP(control.value, version))) {
3270
+ return {
3271
+ isIp: {
3272
+ expected: "A valid IPv" + (version !== null && version !== void 0 ? version : '4') + " value",
3273
+ actual: control.value,
3274
+ message: message
3275
+ }
3276
+ };
3277
+ }
3278
+ return null;
3279
+ };
3280
+ }
3281
+
3263
3282
  var RxapValidators = {
3264
3283
  IsNumber: _IsNumber,
3265
3284
  IsBoolean: IsBoolean,
@@ -3272,7 +3291,8 @@
3272
3291
  IsComplex: IsComplex,
3273
3292
  IsPhoneNumber: IsPhoneNumber,
3274
3293
  IsEmail: IsEmail,
3275
- IsUrl: IsUrl
3294
+ IsUrl: IsUrl,
3295
+ IsIP: IsIP
3276
3296
  };
3277
3297
 
3278
3298
  // endregion