You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by dw...@apache.org on 2001/10/16 21:31:51 UTC
cvs commit: jakarta-struts/contrib/validator/web/jdbc-example/WEB-INF validation.xml
dwinterfeldt 01/10/16 12:31:51
Modified: contrib/validator/web/jdbc-example/WEB-INF validation.xml
Log:
Submitted by: Mary Jo Serrino
Changed 'select' to 'select-one' in the Javascript. The Javascript type for a select box returns select-one or select-multiple if multiple is set to true.
Revision Changes Path
1.4 +5 -5 jakarta-struts/contrib/validator/web/jdbc-example/WEB-INF/validation.xml
Index: validation.xml
===================================================================
RCS file: /home/cvs/jakarta-struts/contrib/validator/web/jdbc-example/WEB-INF/validation.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- validation.xml 2001/09/25 20:30:45 1.3
+++ validation.xml 2001/10/16 19:31:51 1.4
@@ -16,7 +16,7 @@
oRequired = new required();
for (x in oRequired) {
- if ((form[oRequired[x][0]].type == 'text' || form[oRequired[x][0]].type == 'textarea' || form[oRequired[x][0]].type == 'select' || form[oRequired[x][0]].type == 'radio' || form[oRequired[x][0]].type == 'password') && form[oRequired[x][0]].value == '') {
+ if ((form[oRequired[x][0]].type == 'text' || form[oRequired[x][0]].type == 'textarea' || form[oRequired[x][0]].type == 'select-one' || form[oRequired[x][0]].type == 'radio' || form[oRequired[x][0]].type == 'password') && form[oRequired[x][0]].value == '') {
if (i == 0)
focusField = form[oRequired[x][0]];
@@ -96,7 +96,7 @@
oByte = new ByteValidations();
for (x in oByte) {
- if ((form[oByte[x][0]].type == 'text' || form[oByte[x][0]].type == 'textarea' || form[oByte[x][0]].type == 'select' || form[oByte[x][0]].type == 'radio') && form[oByte[x][0]].value.length > 0) {
+ if ((form[oByte[x][0]].type == 'text' || form[oByte[x][0]].type == 'textarea' || form[oByte[x][0]].type == 'select-one' || form[oByte[x][0]].type == 'radio') && form[oByte[x][0]].value.length > 0) {
var iValue = parseInt(form[oByte[x][0]].value);
if (!iValue || !(iValue >= -128 && iValue <= 127)) {
@@ -135,7 +135,7 @@
oShort = new ShortValidations();
for (x in oShort) {
- if ((form[oShort[x][0]].type == 'text' || form[oShort[x][0]].type == 'textarea' || form[oShort[x][0]].type == 'select' || form[oShort[x][0]].type == 'radio') && form[oShort[x][0]].value.length > 0) {
+ if ((form[oShort[x][0]].type == 'text' || form[oShort[x][0]].type == 'textarea' || form[oShort[x][0]].type == 'select-one' || form[oShort[x][0]].type == 'radio') && form[oShort[x][0]].value.length > 0) {
var iValue = parseInt(form[oShort[x][0]].value);
if (!iValue || !(iValue >= -32768 && iValue <= 32767)) {
@@ -174,7 +174,7 @@
oInteger = new IntegerValidations();
for (x in oInteger) {
- if ((form[oInteger[x][0]].type == 'text' || form[oInteger[x][0]].type == 'textarea' || form[oInteger[x][0]].type == 'select' || form[oInteger[x][0]].type == 'radio') && form[oInteger[x][0]].value.length > 0) {
+ if ((form[oInteger[x][0]].type == 'text' || form[oInteger[x][0]].type == 'textarea' || form[oInteger[x][0]].type == 'select-one' || form[oInteger[x][0]].type == 'radio') && form[oInteger[x][0]].value.length > 0) {
var iValue = parseInt(form[oInteger[x][0]].value);
if (!iValue || !(iValue >= -2147483648 && iValue <= 2147483647)) {
@@ -219,7 +219,7 @@
oFloat = new FloatValidations();
for (x in oFloat) {
- if ((form[oFloat[x][0]].type == 'text' || form[oFloat[x][0]].type == 'textarea' || form[oFloat[x][0]].type == 'select' || form[oFloat[x][0]].type == 'radio') && form[oFloat[x][0]].value.length > 0) {
+ if ((form[oFloat[x][0]].type == 'text' || form[oFloat[x][0]].type == 'textarea' || form[oFloat[x][0]].type == 'select-one' || form[oFloat[x][0]].type == 'radio') && form[oFloat[x][0]].value.length > 0) {
var iValue = parseFloat(form[oFloat[x][0]].value);
if (!iValue) {