阅读背景:

重构模型中多个字段的自定义验证

来源:互联网 

I have a model with a custom validation function which verifies that the date is not in the past. Currently, the validation is hard-coded to check a single field, selected_date, in the model. How do I go about refactoring the validation so that I can either pass a parameter to the custom validation so I can test 2 fields?I have a model with a custom validation functio




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: