antiwork/gumroad · error · StripeBeneficialOwnersManager::InvalidFieldError
#{label} may only contain #{allowed_description}.
Error message
#{label} may only contain #{allowed_description}. What it means
InvalidFieldError from StripeBeneficialOwnersManager.validate_kana_param!, the generic character-whitelist check used for the Japanese kana name/address fields (katakana, latin characters, digits, spaces, dashes, and dots — per UserComplianceInfo::KANA_ADDRESS_REGEX / kana regexes). Blank values pass; any value containing characters outside the allowed set raises with the human-readable allowed_description. It is the counterpart of the 'must include katakana' rule: this one restricts the alphabet, that one requires katakana presence.
Source
Thrown at app/business/payments/merchant_registration/implementations/stripe/stripe_beneficial_owners_manager.rb:215
end
# The building number is often just digits and dashes (e.g. "1-1"), so only the town and
# city fields must actually contain katakana — matching the browser-side rules.
{ street_address_kana: "Town/Cho-me (Kana)",
city_kana: "City/Ward (Kana)" }.each do |key, label|
value = address[key].to_s
next if value.blank?
next if value.match?(UserComplianceInfo::HAS_KATAKANA)
raise InvalidFieldError, "#{label} must include katakana characters."
end
end
private_class_method :validate_jp_kana_address_format!
def self.validate_kana_param!(value, label, regex, allowed_description)
value = value.to_s
return if value.blank?
return if value.match?(regex)
raise InvalidFieldError, "#{label} may only contain #{allowed_description}."
end
private_class_method :validate_kana_param!
# The form's maxLength counts characters so a pasted "1.123.456.789" fits, which means a value can
# satisfy the input and still carry too few digits. Checking digits here — and normalizing in
# build_person_params — keeps this path from handing Stripe a number it will refuse, which is the
# rolled-back-create failure that left one seller with eight silent attempts.
def self.validate_colombia_id_number!(params, user)
return unless user.alive_user_compliance_info&.legal_entity_country_code == Compliance::Countries::COL.alpha2
id_number = params[:id_number].to_s
return if id_number.strip.blank?
return if Compliance::ColombiaIdNumber.valid?(id_number)
raise InvalidFieldError, Compliance::ColombiaIdNumber::ERROR_MESSAGE
end
private_class_method :validate_colombia_id_number!
def self.representative?(person)
relationship = person.is_a?(Hash) ? person[:relationship] || person["relationship"] : person[:relationship]View on GitHub (pinned to afeacbd394)
Solutions
- Re-enter the value using only the allowed characters listed in the message (katakana, latin, digits, spaces, dashes, dots) and resubmit.
- Match your front-end input validation to the same regex so the user is stopped before submit.
- Normalize input before send: strip full-width punctuation (、,「」etc.) or transliterate kanji to kana.
- Leave optional kana fields blank instead of filling them with placeholder text like 'N/A' (dashes/dots are fine, slashes are not).
Example fix
# before: kanji + full-width comma fails the whitelist params[:name_kana] = "山田、タロウ" # after: katakana + whitelisted separators only params[:name_kana] = "ヤマダ タロウ"
Defensive patterns
Strategy: validation
Validate before calling
return if value.blank?
unless value.match?(UserComplianceInfo::KANA_ADDRESS_REGEX)
Result.invalid("#{label}: only katakana, latin, digits, spaces, dashes, dots")
end Type guard
def kana_whitelist_ok?(value) value.to_s.blank? || value.to_s.match?(UserComplianceInfo::KANA_ADDRESS_REGEX) end
Prevention
- Mirror the server's whitelist regex in client validation.
- Normalize full-width punctuation to whitelisted separators before submit.
- Test with pasted real-world JP addresses (they carry full-width commas) before shipping forms.
When it happens
Trigger: Submitting a JP beneficial-owner kana field (name_kana, or kana address keys like street_address_kana/block/building) containing characters outside the whitelist — e.g. kanji, full-width punctuation like '、', commas, apostrophes, or emoji.
Common situations: Users typing kanji or half-width punctuation into kana fields; copy-paste from documents with full-width forms; forms not enforcing the same input pattern client-side so the server raise surprises the user.
Related errors
- #{label} must include katakana characters.
- #{missing.to_sentence} #{missing.length == 1 ? "is" : "are"}
- Your Cédula de Ciudadanía or Cédula de Extranjería must be 6
- net_negative_seller_revenue
- responseData.error_message
AI-assisted analysis of antiwork/gumroad@afeacbd394 (2026-08-21).
Data as JSON: /api/errors/1eada04086e5085f.
Report an issue: GitHub.