Ran into a weird NilClass exception in dry-logic via dry-validation when trying to validate an empty String value. ¯\(°_o)/¯
https://discourse.dry-rb.org/t/strange-dry-validation-dry-schema-bug/1749
#dry_validations #dry_schema
Strange dry-validation / dry-schema bug

Ran into this NilClass exception coming from dry-logic, via dry-schema and dry-valiation. Code in question: https://github.com/ronin-rb/ronin-app/blob/e7b0b7880f1e5c41a29750596d951ba6b0bb35f1/lib/ronin/app/validations/recon_params.rb#L41-L62 Spec Failure: allow `ignore` to be empty since it's submitted via an HTML form. · ronin-rb/ronin-app@e7b0b78 · GitHub 1) Ronin::App::Validations::ReconParams rules :ignore must allow an empty value for :ignore Failure/Error: result = subject...

dry-rb discussion forum

How would you use dry-types/dry-schema to map a finite set of possible Strings to
a finite set of Symbols? `Types::String.enum('string' => :symbol)` only seems to map Strings and Symbols to Strings. I need the output to be Symbols.

Input: ['syn', 'ack']
Output: [:syn, :ack]

#dry_rb #dry_types #dry_schema