modules/claims_api/app/models/claims_api/auto_established_claim.rb
def massage_invalid_disability_names
      disabilities = form_data['disabilities']
      invalid_characters = %r{[^a-zA-Z0-9\\\-'.,/() ]}

      disabilities.map do |disability|
        name = disability['name']
        name = truncate_disability_name(name: name) if name.length > 255
        name = sanitize_disablity_name(name: name, regex: invalid_characters) if name.match?(invalid_characters)
        disability['name'] = name

        disability
      end
    end
# EVSS requires disability names to be less than 255 characters and cannot contain special characters.
# Rather than raise an exception to the user, massage the name into a valid state that EVSS will accept.
EVSS requires disability names to be less than 255 characters and cannot contain special characters.
Rather than raise an exception to the user, massage the name into a valid state that EVSS will accept.
EVSS requires disability names to be less than 255 characters and cannot contain special characters . Rather than raise an exception to the user massage the name into a valid state that EVSS will accept .
def massage_invalid_disability_names
      disabilities = form_data['disabilities']
      invalid_characters = %r{[^a-zA-Z0-9\\\-'.,/() ]}
      disabilities.map do |disability|
        name = disability['name']
        name = truncate_disability_name(name: name) if name.length > 255
        name = sanitize_disablity_name(name: name, regex: invalid_characters) if name.match?(invalid_characters)
        disability['name'] = name
        disability
      end
    end
def massage_invalid_disability_names disabilities = form_data [ 'disabilities' ] invalid_characters = %r{ [^a-zA-Z0-9 \\ \- '.,/() ] } disabilities . map do | disability | name = disability [ 'name' ] name = truncate_disability_name ( name : name ) if name . length > 255 name = sanitize_disablity_name ( name : name , regex : invalid_characters ) if name . match? ( invalid_characters ) disability [ 'name' ] = name disability end end
EVSS requires disability names to be less than 255 characters and cannot contain special characters.
EVSS requires disability names to be less than 255 characters and cannot contain special characters .