@sumaris-net/ngx-components 2.4.77 → 2.4.78-rc1

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.
@@ -3685,14 +3685,14 @@ class SharedValidators {
3685
3685
  * @param precision
3686
3686
  */
3687
3687
  static precision(precision) {
3688
- if (precision == null)
3689
- throw new Error('Missing required precision value. Cannot be null or undefined');
3688
+ if (isNil(precision))
3689
+ throw new Error('Required a not nil precision');
3690
3690
  return (control) => {
3691
3691
  const value = control.value;
3692
- if (isNil(value) || Number.isNaN(value)) {
3692
+ if (isNilOrBlank(value) || Number.isNaN(value)) {
3693
3693
  return null;
3694
3694
  }
3695
- if (value % precision !== 0) {
3695
+ if (+value % precision !== 0) {
3696
3696
  return { precision: { precision } };
3697
3697
  }
3698
3698
  return null;