我有一个字段,它将是两个对象之一(存储的信用卡或给定的信用卡):
payment_method:
cc_token: String
security_code: String
payment_method:
number: String
security_code: String
expiration_month: Number
expiration_year: Number
billing_address:
_type: String
first_name: String
last_name: String
address_line1: String
address_line2: String
zip_code: String
city: String
state: String
phone_number: String
我知道传递的数据将匹配其中之一,但不会同时匹配两者。有没有办法为验证指定某种 OR 构造?