Closed tanakahisateru closed 12 years ago
We always should create Pinoco_Validator's result formatted object by alternative way to share form view with initial-page and error-back-page.
<?php if(!empty($_POST)) { $validator = new Pinoco_Validator($_POST); $validator->check(...)->is(...); $form = $validator->result; } else { $form = Pinoco_Validator::emptyResult(); // or ::emptyResult($defaults); }
The $form value would be used as:
<input type="text" name="name" value="${form/foo/value}" /> <span class="error" tal:condition="form/foo/invalid">${form/foo/message}</span>
The empty result should be responsible for any names. I don't want to code list of field names.
Finished.
We always should create Pinoco_Validator's result formatted object by alternative way to share form view with initial-page and error-back-page.
The $form value would be used as:
The empty result should be responsible for any names. I don't want to code list of field names.