Skip to content

Commit

Permalink
[SOTFIX-95] Fix for normalizer issue (#21)
Browse files Browse the repository at this point in the history
* Adding rules export

* Adding fix for normalizer issue

* Update package.json
  • Loading branch information
alsoto25 authored Jan 27, 2025
1 parent 95e5eb5 commit 3e84bc9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 3e84bc9

Please sign in to comment.