Skip to content

Commit

Permalink
Validate empty but non-zero length string values
Browse files Browse the repository at this point in the history
  • Loading branch information
aaron-collier committed Nov 3, 2023
1 parent 73996dc commit 5024cc3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/cocina/models/validators/description_values_validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,8 @@ def validate_obj(obj, path)
end

def validate_values_for_blanks(hash, path)
return unless hash[:value] && hash[:value].is_a?(String) && hash[:value].blank? # rubocop:disable Style/SafeNavigation
puts hash
puts "hash[:value] = #{hash[:value]}"
return unless hash[:value] && hash[:value].is_a?(String) && hash[:value].blank? && !hash[:value].empty? # rubocop:disable Style/SafeNavigation

error_paths_blank << path_to_s(path)
end

Expand Down

0 comments on commit 5024cc3

Please sign in to comment.