24. WEB CONTEXT
So now we understand how
to take a set of fields and
validate them
25. WEB CONTEXT
So now we understand how
to take a set of fields and
validate them
But in a web/CGI context,
if the validation fails, we
can’t just die();
26. WEB CONTEXT
So now we understand how
to take a set of fields and
validate them
But in a web/CGI context,
if the validation fails, we
can’t just die();
Have to communicate nature
of failure back to the user
29. WEB CONTEXT
Also, in a more realistic case, we’ll have more complicated
forms
1 form submit -> changes to multiple objects / tables on the
backend
30. WEB CONTEXT
Also, in a more realistic case, we’ll have more complicated
forms
1 form submit -> changes to multiple objects / tables on the
backend
From a UI perspective, we want to display error messages as
close to the source as possible
34. DATA::MANAGER IS
1 or more Data::Verifier objects
1 Message::Stack object
1 Data::Verifier per form “scope”
35. DATA::MANAGER IS
1 or more Data::Verifier objects
1 Message::Stack object
1 Data::Verifier per form “scope”
1 Message::Stack object to contain all errors/messages about
the results of verifying all the Data::Verifiers in the
Data::Manager
36. DATA::MANAGER IS
1 or more Data::Verifier objects
1 Message::Stack object
1 Data::Verifier per form “scope”
1 Message::Stack object to contain all errors/messages about
the results of verifying all the Data::Verifiers in the
Data::Manager
Tiny bit of sugar code sprinkled over the top