Skip to content

Commit

Permalink
SDK-1448: Split on spaces only
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgrayston committed Feb 13, 2020
1 parent 88ff882 commit f26aefe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/yoti/data_type/document_details.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def initialize(value)
# @param [String] value
#
def parse_value(value)
attributes = value.split(/\s/)
attributes = value.split(/ /)
raise(ArgumentError, "Invalid value for #{self.class.name}") if attributes.length < 3 || attributes.include?('')

@type = attributes[TYPE_INDEX]
Expand Down
3 changes: 2 additions & 1 deletion spec/yoti/data_type/document_details_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@
'\\',
'"',
'\'\'',
'\''
'\'',
"\t"
].each do |value|
it "#{value} should be allowed as document number" do
document_details = Yoti::DocumentDetails.new("some-type some-country #{value} - some-authority")
Expand Down

0 comments on commit f26aefe

Please sign in to comment.