[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Formulator/Validators - validators.zcml:1.1.2.1
Stephan Richter
srichter@cbu.edu
Fri, 1 Mar 2002 02:04:37 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/Formulator/Validators
In directory cvs.zope.org:/tmp/cvs-serv22190/Validators
Added Files:
Tag: srichter-OFS_Formulator-branch
validators.zcml
Log Message:
Checkin for new Formualtor layout. Much has changed since the initial
checkin:
- Both classes and instances of fields can be used as factory when creating
views.
- Field: This object is simply a meta-data container for a piece of
information; for content objects these are usually its properties.
Note: It is planned to have a CompositeField for more complex inputs,
such as dates.
- FieldViews are virtual objects; they are basically realized Widgets (or
Widgets in context)
- Validator: An object that validates data. Note that this object is
totally input/protocol-agnostic. Therefore the old concept of some of the
Zope 2 Formulator validators is not applicable anymore.
- Widget: This is a generic component that is concerned about the
presentation of a field in a particular protocol. A difference to the
Zope 2 Formulator version is that the widget is also responsible of
converting possible input-specific representation to a standard one. This
is not yet fully implemented though.
- Form: A protocol-specific object that is concerned with the overall
representation of a form and its action.
- There is a Validator and Field Registry, since Fields and Validators can
also be used independent of Formulator's goals. Fields should really
become the standard way to provide meta-data for properties.
Todo: (too much)
- I need to write a proper metaConfigure.py.
- Make a CompositeField.
- Create XUL Widgets.
- Clean up files.
- Finishing the conversion to the Zope 3 Formulator model.
=== Added File Zope3/lib/python/Zope/App/Formulator/Validators/validators.zcml ===
<zopeConfigure
xmlns='http://namespaces.zope.org/zope'
xmlns:formulator='http://namespaces.zope.org/formulator'
>
<formulator:registerValidator name="BooleanValidator"
validator="Zope.App.Formulator.Validators.BooleanValidator." />
<formulator:registerValidator name="DateTimeValidator"
validator="Zope.App.Formulator.Validators.DateTimeValidator." />
<formulator:registerValidator name="EmailValidator"
validator="Zope.App.Formulator.Validators.EmailValidator." />
<formulator:registerValidator name="FileValidator"
validator="Zope.App.Formulator.Validators.FileValidator." />
<formulator:registerValidator name="FloatValidator"
validator="Zope.App.Formulator.Validators.FloatValidator." />
<formulator:registerValidator name="IntegerValidator"
validator="Zope.App.Formulator.Validators.IntegerValidator." />
<formulator:registerValidator name="LinesValidator"
validator="Zope.App.Formulator.Validators.LinesValidator." />
<formulator:registerValidator name="LinkValidator"
validator="Zope.App.Formulator.Validators.LinkValidator." />
<formulator:registerValidator name="ListLinesValidator"
validator="Zope.App.Formulator.Validators.ListLinesValidator." />
<formulator:registerValidator name="MultiSelectionValidator"
validator="Zope.App.Formulator.Validators.MultiSelectionValidator." />
<formulator:registerValidator name="PatternValidator"
validator="Zope.App.Formulator.Validators.PatternValidator." />
<formulator:registerValidator name="SelectionValidator"
validator="Zope.App.Formulator.Validators.SelectionValidator." />
<formulator:registerValidator name="StringBaseValidator"
validator="Zope.App.Formulator.Validators.StringBaseValidator." />
<formulator:registerValidator name="StringValidator"
validator="Zope.App.Formulator.Validators.StringValidator." />
<formulator:registerValidator name="TextValidator"
validator="Zope.App.Formulator.Validators.TextValidator." />
</zopeConfigure>