swoft-cloud / swoft

🚀 PHP Microservice Full Coroutine Framework
https://swoft.org
Apache License 2.0
5.58k stars 788 forks source link

参数效验不通过时 , 建议提示内容改为key #98

Closed assert6 closed 6 years ago

assert6 commented 6 years ago

name="age" , min=18 如果参数 age = 15 , 建议提示 age is too small 而不是 15 is too small

successgo commented 6 years ago

提个小想法,像symfony中的字段验证时会有默认messeage template,用户在使用时也可以再自定义。

huangzhhui commented 6 years ago

@gdc676463 每个验证器在不同的条件下会有不同的message,如何去定义?

huangzhhui commented 6 years ago

现在 (swoft-framework:v1.0.4) 已使用属性Name作为提示语,并对提示语进行了重新的梳理