You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wonder if you knew how to implement conditional logic - the model has two attributes, company and person. On completing the form, validation should fail only if both are left empty.
would you have an idea how to structure this?
thanks
The text was updated successfully, but these errors were encountered:
validate:
keywords:
custom: 'is_location_set'
location:
custom: 'is_keyword_set'
is_location_set: (attr, value) =>
if @get(attr) is '' and @get('location') is ''
'no location'
is_keyword_set: (attr, value) =>
if @get(attr) is '' and @get('keywords') is ''
'no keywords'
Hi, thanks for the plugin - really useful.
I wonder if you knew how to implement conditional logic - the model has two attributes, company and person. On completing the form, validation should fail only if both are left empty.
would you have an idea how to structure this?
thanks
The text was updated successfully, but these errors were encountered: