solnic/virtus — pull request #197 by cflipse (2013-09-25 14:43:34+00:00)
Title: failing spec for nested coercions

One more, and this may be intentional, or a regression, I'm not sure; failing spec attached to demonstrate

In beta0, I was able to define an explicit lambda for a coercion, though I don't find that obviously mentioned in the readme anywhere. There are a couple of cases where I set things up to convert a flat string value to a value object, as in the simplified EmailAddress example in this PR. It seems like a specific coercer is recognized for flat attributes, but is no longer respected for embedded attribute types.

Either way, the documentation of both Virtus and Coercer is somewhat unclear about how I might go about building a coercion for a non-core value, like EmailAddress.

Thanks!