Ryan
Great to hear from the developer!
Don't really follow you here, as surely the idea is to prevent users from saving bad data? So long as you provide clear error messages how is this a problem? With jQuery it's pretty easy to provide the message as soon as users tab out of the field.
Don't understand much about PW yet, but doesn't doing this in the template mean that issues will only show up at runtime?
I suggested the regex idea as a quick and dirty fix, but obviously it's going to restrict use of the feature to sad geeks like us. Plus, on thinking it through, a single field for an error message would hit problems with your back-end internationalisation.
Years ago I developed a flexible declarative approach and it has served me well. Some of the modern PHP frameworks use a similar idea. You develop an easily extended utility library of validations, and each validation has an error string in all active languages. The string can use template-like placeholders for parameters: "Number should be between {1} and {2}." Then you develop a simple declarative syntax for setting validations and any relevant parameters. Here's a couple of examples:
is_greater_than,10
is_between,1,365
is_alphanumeric;is_max_length,256
As a catchall, you can offer access to regexes:
matches_pattern,
^\$(\d{1,3}(\,\d{3})*|(\d+))(\.\d{2})?$,"Must be a valid USD price"
Another useful feature, I find, is filters that clean up input. These are run before the validations and ensure consistent presentation.
For example, for a city or postal code you might use:
to_uppercase
For a field in which you are entering, say, architects, you can tidy up capitalisation with:
to_pretty_name
If input isn't entirely trusted, you can offer a range of sanitation filters to eliminate cross-site scripting etc. This would open up the possibility of using PW for, say, social content management.
The actual plumbing for this is just a few lines of code, and there are plenty validation and filter libraries to plunder. You'd be getting a lot of functionality for a small investment! I guess you'd tuck this out of the way on the advanced tab. For types with limited validation options such as numeric fields you could improve usability by offering the validation options as fields on the form instead of declarations. For text fields, the declarative string would be the most flexible, I think. You could offer popup help so users could check their options without leaving the form.
Personally, I would find this pretty useful. Why not help content creators achieve consistency and correctness?