This page is about FormValidator v2. It's to become an update of my current form-validator, altough it will not be 100% backwards compattible.

Goals

In a short summary the goals stand as follows:

Like before the main goals are still, ease of implementation and speed of implementation. A developer with negligent skill in Javascript should still be able to implement this validator with a minimum of effort.

An important new goal will be extinsibillity. Although the first validator had already seen a few minor updates in which some extensibility was added, in this version some backwards compatibility issues may arise directly as a result of this particular goal.

Short-term tasks

In a short summary the tasks are:

I need to isolate the validator's namespace. In order to do this the validator will be encapsulated within it's own prototype/object. This is the first modification that will take place, while doing so the validator's default function will have to be rerouted. In an attempt to keep it as much backwards compatible as possible, I will create a function wit the same signature as before, this function will attempt to retain a backwards-compatibility adapter.

Medium and long-term tasks

In a short summary the tasks are:

First on the menu would be a basic label-hunter. Form-elements, in a properly formatted form, should have a label linked to them, this label should hold a human-readable presentation of the form-element. Instead of using \1 in messages to output the name-property I would like to be able to use the label's text-node. Aditionally this label-hunter should be configurable so that when the label is found a devopers personal function can return a string that's obtained from an abarant html-structure.

The validator needs a better default error-marker. I can't be bothered to check what the current one does, but I'm not satisfied with it. Additionally the error-marker routine should be extensible with a developer-supplied alternative that's more suitable to his particular html markup.

The validator needs to be configurable to do 'hot validation'. I want it to be able to do validation as you type as opposed to validation on-submit only. Off course when hot-validation is enable onsubmit validation should still be applied as well, just in case people ignore your errors while they're typing.