diff --git a/active-rfcs/0000-custom-validator-warn.md b/active-rfcs/0000-custom-validator-warn.md new file mode 100644 index 00000000..19e1ef2e --- /dev/null +++ b/active-rfcs/0000-custom-validator-warn.md @@ -0,0 +1,54 @@ +- Start Date: (2025-01-19) +- Target Major Version: (3.x) +- Reference Issues: (fill in existing related issues, if any) +- Implementation PR: (leave this empty) + +# Summary + +Expand the warning information of validator verification to provide clearer error prompts. + +# Basic example + +```vue + +``` + +# Motivation + +In custom components, we usually validate many props for a better user experience. Currently, the validator function will only return true or false. If it is false, it means that the validation has failed and a warning message will be thrown inside vue. + +However, the warning message only indicates that a prop check failed, but users cannot customize and expand more specific error descriptions. + +# Detailed design + +In order not to affect the original users, it may be a good idea to add a new function to give users more customization space. + +refer #Basic example + +# Drawbacks + +In most cases, the current validator function will suffice. (This proposal is merely to optimize the development experience based on the original one.) + +# Alternatives + +Add new parameters based on the original validator and make different processing according to different parameters. + +# Adoption strategy + + +# Unresolved questions + +N/A \ No newline at end of file