This is a fairly simple set of API's that would be handled by a LedgerSMB::Request module (which we'd make Form.pm and LedgerSMB.pm inherit for now). This would be for handling input declaratively. The API would be as follows:
$request->required($att1, $att2, $att3....);
would raise an exception if any attribute was not provided, This would allow us to more easily eliminate the low-knowledge errors provided to users like "required input not provided".
$request->required_series($start, $stop, $attr1, $att2, $att3)
This would generate names in the format of ${att1}_$start ..${att1}_$stop and require those.
The following would apply only to 1.4:
$request->number and $request->number_series with the same syntax above.
$request->date and $request->date_series with the same syntax above.
What do people think?
--
Best Wishes,
Chris Travers
Efficito: Hosted Accounting and ERP. Robust and Flexible. No vendor lock-in.