Translate breeze validation messages

前端 未结 1 487
有刺的猬
有刺的猬 2021-01-03 09:46

Improving my example on how to use the metadata obtained to create validation rules in knockout (http://stackoverflow.com/questions/13662446/knockout-validation-using-breeze

相关标签:
1条回答
  • 2021-01-03 10:27

    This is a good idea. Please add it to the Breeze User Voice ( and vote for it). We take these suggestions very seriously.

    There is another approach for the short term. You can replace any of the

    Validator.messageTemplates
    

    with your own messages. Validator.messageTemplates is a configuration object keyed by the name of the validator where the value is a parameterized version of the error message.

    We do need to document this better.

    0 讨论(0)
提交回复
热议问题