The easiest way is to customize the validation messages and make it
empty for the birthdate:
<!--V 'MANDATORY:birthDate'--><!--/V-->
http://rifers.org/wiki/display/RIFE/Validation#Validation-4d
I'll be looking into removing the mandatory error in this case from
within RIFE, since as you say, it makes little sense.
Best regards,
Geert
On 15 Jun 2006, at 23:08, apdewith wrote:
Hi,
Now that I have started to use the validation, I have a practical
validation question:
code snippet:
addConstraint( new ConstrainedProperty( "birthDate" )
.notNull(true)
.notEmpty(true)
.format( mInputDateFormat )
);
template snippet(s):
${b MARK:ERROR}style="display ;"${/b}
${b MARK:ERROR:ALT}class="error_markalt"${/b}
${b ERRORMESSAGE:*}<b>${v ERRORMESSAGE/}</b>${/b}
${b ERRORS:*}${v ERRORS/}${/b}
${b MANDATORY:*}[Mandatory${/b}
${b INVALID:se_birthDate}[Format dd-MM-yyyy]${/b}
<tr class="error_mark" id="validationErrors" style="display: ${v
displayErrors}none${/v};">
<td> </td>
<td> </td>
<td> </td> <td> </td>
<td ${v MARK:ALT:se_firstName}${/v}>${v ERRORS:se_firstName}
${/v}</td>
<td ${v MARK:ALT:se_lastName}${/v}>${v ERRORS:se_lastName}
${/v}</td>
<td ${v MARK:ALT:se_birthDate}${/v}>${v ERRORS:se_birthDate}
${/v}</td>
<td ${v MARK:ALT:se_street/}>${v ERRORS:se_street} ${/v}
</td>
<td ${v MARK:ALT:se_zip/}>${v ERRORS:se_zip} ${/v}</td>
<td ${v MARK:ALT:se_city/}>${v ERRORS:se_city} ${/v}</td>
<td ${v MARK:ALT:se_country/}>${v ERRORS:se_country} ${/
v}</td>
<td> </td>
<td> </td>
</tr>
The idea is to display an error row above the inline edited row
in a table.
If the format for the birthDate is not correct, two error messages
are displayed: MANDATORY and INVALID
Is it possible to only display the INVALID in this particular case?
_______________________________________________
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users
--
Geert Bevin
Uwyn "Use what you need" - http://uwyn.com
RIFE Java application framework - http://rifers.org
Music and words - http://gbevin.com
_______________________________________________
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users