Implemented minlength (although it's not supported in most browsers).
min and max now used for numbers, ranges and dates only.
Minor optimisations in FieldValid method.