Skip to content

Commit 64111df

Browse files
committed
Fixed tests and docs
1 parent fd971b9 commit 64111df

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/getting-started.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ By the example, you would get the following response:
8383
"email": [
8484
{
8585
"rule": "required",
86-
"message": "The field field is required."
86+
"message": "The field is required."
8787
}
8888
]
8989
}

tests/index.test.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ describe("validate() function ", () => {
6565
const result = await validate(data, rules);
6666
expect(result.isValid).toBe(false);
6767
expect(result.errors.price[0].message).toBe(
68-
"The field field must be between 1000 and 2000."
68+
"The field must be between 1000 and 2000."
6969
);
7070
});
7171

@@ -96,11 +96,11 @@ describe("validate() function ", () => {
9696

9797
const result = await validate({ email: "" }, rules, {
9898
translations: {
99-
required: "The field field is required. (custom translation message)",
99+
required: "The field is required. (custom translation message)",
100100
},
101101
});
102102
expect(result.errors.email[0].message).toBe(
103-
"The field field is required. (custom translation message)"
103+
"The field is required. (custom translation message)"
104104
);
105105
});
106106

0 commit comments

Comments
 (0)