Skip to content

Form remote validation error #5095

@444683462

Description

@444683462
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

3.0.0-beta.4

Environment

vue3 win11

Reproduction link

http://not

Steps to reproduce

const validate_account_name = async (_rule, value) => {
if (value === "") {
return Promise.reject("不能为空");
}if (value == "1") {
return Promise.reject("不能为1");
} else {
var params = new URLSearchParams();
params.append("name", value);
axios
.post(store_state.url "points/isPointsAccountNameExist", params)
.then((response) => {
if (response.data == "find") {
//已存在
return Promise.reject("已经存在");
} else {
return Promise.resolve();
}
})
}
};

const rule_validate = {
points_account_name: [
{
validator: validate_account_name,
trigger: "change",
},
],
};

What is expected?

希望能正常显示报错信息--已经存在

What is actually happening?

Uncaught (in promise) 已经存在

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions