Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Valiadation of Object parameters

 
Navi Lock
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,
Have a form which has one parameter as an Object of a class along with the other regular parameters .

Parameter's like Name / Date ... etc can be validated, but
how to validate all the parameters of that object at the same time ??.
That object itself has parameters like Name/ Date to be validated also...


Thanks In advance,
Navi.
 
alan do
Ranch Hand
Posts: 354
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can validate anything. Name, Date are objects too. the key thing is WHAT rule do you want to validate your object against, oh and also WHERE do you want to do the validation. perhaps describe your problem in more details you may be able to get some real help.
 
Navi Lock
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Thanks for responding.
I have a Request Form.The request has a parameter as
1)First Name -- Input Box
2)A customised class Object which has parameters like the First Name (multiple parameters).
I know how to validate the "First Name" in the "Validation.xml" file.
Need to know, if there is a way to do the same ( at the same time / in the same form request)in the validation .xml for the parameters of the object of the (2).

An example would be great..
Thanks,
-Navi
[ October 19, 2005: Message edited by: Navi Navi ]
 
Navi Lock
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cmon guys Help me out..........
 
alan do
Ranch Hand
Posts: 354
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry, i was away for training...
in your case, you can define your form validation properties using the object.propertyName. for example, if your form prop is
<form-property name="requestParams" type="my.custom.Object"/> which contains a 'firstName' field.

your validation definition should be
<field property="requestParams.firstName" depends="..."...> ... </field>. everything else is business as usual.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic