Am 02.02.2013 17:21, schrieb Paul Johnston:
> If you're happy to do the work, and there's not going to be major
> breakage (which I don't expect) - go ahead and make the tw2 validators
> match FormEncode.
Ok, I've just created a pull request for that.
> I think the approach I've taken has some advantages, especially if you
> want to validate existing values saved in db. But FormEncode
> compatibility outweighs this.
Right, if you only want to validate and not convert, your API with
emphasis on the validation method feels more natural.
The main problem was that the external validation method use the same
name "validate_python" as the internal method in FormEncode where it was
used only internally to validate objects that are already converted to
Python (hence the name).
Maybe the patch will also cause some confusion (particularly because it
already uses the new method names of FormEncode 1.3 instead of the old
names), but I think still less confusing than having APIs that look the
same but behave differently.
-- Christoph