Fix issue with the error messages
Many of the errors where incorrectly showing "Required field is not provided" when the field was provided but not valid. This was raised by @ron on PR #3825
This commit is contained in:
@@ -524,7 +524,7 @@ describe("utils", function() {
|
||||
type: "boolean",
|
||||
value: "test string"
|
||||
}
|
||||
assertValidateParam(param, ["Required field is not provided"])
|
||||
assertValidateParam(param, ["Value must be a boolean"])
|
||||
|
||||
// valid boolean value
|
||||
param = {
|
||||
@@ -584,7 +584,7 @@ describe("utils", function() {
|
||||
type: "number",
|
||||
value: "test"
|
||||
}
|
||||
assertValidateParam(param, ["Required field is not provided"])
|
||||
assertValidateParam(param, ["Value must be a number"])
|
||||
|
||||
// invalid number, undefined value
|
||||
param = {
|
||||
@@ -666,7 +666,7 @@ describe("utils", function() {
|
||||
type: "integer",
|
||||
value: "test"
|
||||
}
|
||||
assertValidateParam(param, ["Required field is not provided"])
|
||||
assertValidateParam(param, ["Value must be an integer"])
|
||||
|
||||
// invalid integer, undefined value
|
||||
param = {
|
||||
|
||||
Reference in New Issue
Block a user