diff --git a/package.json b/package.json index 93d2dbe..55b2c72 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ltvco/form-validation", - "version": "1.0.2", + "version": "1.0.3", "description": "Library to handle form validation, similar to jQuery Validation, but without any dependencies.", "types": "./dist/types/index.d.ts", "main": "./dist/index.js", diff --git a/src/index.ts b/src/index.ts index 3f87ecb..5f88d30 100644 --- a/src/index.ts +++ b/src/index.ts @@ -119,7 +119,7 @@ export class Validation implements FormValidation { const normalizedValue = normalizer(field.value, field, this.form); // Only change the value if it's different from the normalized one. - if (normalizedValue && normalizedValue !== field.value) { + if (normalizedValue !== field.value) { field.value = normalizedValue; } }