This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

strtus2: howto validate a form where not all fields are mandatory?

 
Peter Primrose
Ranch Hand
Posts: 755
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Below I have a class name entity (name, address, type...)
The end-user provides some information but not all fields are mandatory.

Q: how can I have 'name' and 'address' to be mandatory but 'type' can be left out? (using annotation)

thanks!



@Validation
public class CustomizeAction extends BaseSupport
{
private Entity entity = new Entity();
.
.
.
public Entity getEntity()
{
return entity;
}

/// WHAT COMES HERE ?!?
public void setEntity(Entity entity)
{
this.entity = entity;
}
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic