阅读背景:

如何从一个模型验证另一个模型中一个字段的存在

来源:互联网 

I have one model PunchingRequest and one model PunchingInformation, In PunchingInformation i have two fields, punch_in_time and punch_out_time. I want to insert record in punching requests table if and only if atleast one out of punch_in_time or punch_out_time contains a value. I have a form containing fields related to both PunchingRequest and PunchingInformation. How can I impose this validation?I have one model PunchingRequest and one model




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

分享到: