Hi Soumya,
You can do validation in your simple method by using condition like:
<condition>
<or>
<and>
<not><if-empty
field="parameters.thruDate"/></not>
<if-compare-field operator="less"
field="timeEntry.fromDate" to-field="parameters.thruDate"/>
</and>
<if-empty field="parameters.thruDate"/>
</or>
</condition>
Refer
ofbiz10.04\applications\workeffort\script\org\ofbiz\workeffort\timesheet\TimesheetServices.xml
--
Thanks & Regards,
Pankaj Savita
Mob: +91 9890262476
Mail to: [email protected]
On Fri, Oct 1, 2010 at 5:01 PM, soumya jyoti guru <[email protected]>wrote:
> Hi all,
> I am facing a problem while validating two dates used in the
> same form (start date, end date).I have written a code
> for create and there I had included two fields named as start date and
> end date.
> The problem is that the data gets created even if the start
> date=2010-09-30 and the end date=2010-09-01 which changes the meaning
> of the two fields.Can anybody suggest me a way to show a error
> message while this is done.
> with regards
> Soumya
>