← Graph

Is parsing and validation really a cycle because of coercion?

question 2 connections

Audience member observes coercion was step 3 or 4 in the parsing pipeline and asks whether parsing and validation end up forming a cycle: parse → validate → parse → validate. Sutterer agrees — parsing is already validation — and says he already discussed this with Piotr Solnica; his proposed solution is embedding small dry-validation rules or 'dry-coercion' inside parsing steps so they can add errors directly to the result object.

answer_summary
Yes. Coercion is validation, so the parsing pipeline should embed small validation rules (e.g. dry-validation snippets) that push errors onto the result object.
question Is parsing and validation really a cycle because of coercion?
about
Question concerns the Reform 3 parsing/validation step design.
question Is parsing and validation really a cycle because of coercion?
asked_at
Audience Q&A question.

Provenance