Forum OpenACS Q&A: No validator for date attributes?

Collapse
Posted by Reuven Lerner on
One of the sites I'm working on would really benefit from having
group attributes of type "date".  I looked through the code for in
acs-subsite/www/admin/attributes/add, and saw that users can only
enter data for which we have a "validator."

I briefly considered why dates wouldn't have validators, and even
thought about writing my own (although it's not clear to me what that
would involve) -- but then I saw that datatype_validator_exists_p is
hard-coded to answer "no" when faced with a date type.

So, is there any particular reason for this?  (I presume that other
people have thought about this problem before, and that there's a
reason why aD didn't support it in their version.)  How would I go
about writing a validator?  If I'm willing to force my users to enter
dates in a particular format, can I get away without a validator?