Skip to content
fge edited this page Nov 12, 2011 · 29 revisions

In 0.3

Logging

Work has just started... One class has logging. One.

And one or more from below

"Fail fast" validation

Right now, validation will go as deeply as it can -- for instance it will check all items of an array even if the first one fails validation. Propose a mode which will make the validation fail at the first failing item.

Reusable validators

This is a tough one, but it can be a HUGE time saver.

The plan is to make a validator cache accessible from whatever needs it, and this means quite a lot of classes. This probably means too that implementing this will require a refactoring.

Basically, to get it done, all validators must implement .equals() and .hashCode(), and be reusable. Not an easy job.

For syntax validators, it is probably easier since the instance they must validate is passed to them as an argument. For keyword validators, not so much: some of them currently retain their state, which means this state must be taken into account.

Section 6 of the draft

But first, understand that section and its implications...

Primitive-type only numeric validation

Javascript is limited, by its specification, to operate on 64bit IEEE 754 numbers. The implementation handles arbitrarily large numbers, but this may be unneeded. Make a validation feature which will allow to use primitive types long and double only.

Clone this wiki locally