- From: Olav Junker Kjær <olav@olav.dk>
- Date: Mon, 07 Feb 2005 18:50:07 +0100
You write: > The model used by the validity DOM attribute is not very clean, and > may deserve to be replaced with something that has been thought > through with more care Perhaps the bit field interface could be left out. The only thing that can't be done through the properties, is easily checking if the field is valid or not, like: if (field1.validity) ... This could be supported by having the validity attribute return null when the field is valid. The ValidityState object would then alway be the description of an error. This may be a bad idea though, since code like: if (field1.validity.isPatternMismatch) ... would generate an error when the field is valid. A better solution would perhaps be to add an attribute, "isValid" to ValidationState. So you could write: if (field1.validity.isValid) ... Only problem is that the naming seems a bit strange. "validityState" would be clearer than "validity", but also a bit more cumbersome. Anyway, it seems a bit redundant to support both the bit field and property interfaces. regards Olav Junker Kj?r
Received on Monday, 7 February 2005 09:50:07 UTC