You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Griffith, Michael *" <Mi...@fda.hhs.gov> on 2009/03/13 17:36:12 UTC

Check Field Value in list using Annotation/Validation?

Hello all, 
 
Is it possible to check a field value against a list using the
@ConditionalVisitorFieldValidator annotation?
 
I'm thinking of something like this:

@Column(name="VENDOR_TYPE", nullable=false)
@ConditionalVisitorFieldValidator (expression="vendorType == 'COTS'&&
vendorType == 'GOTS' && vendorType == 'MOTS'", key="invalid.vendortype")
public String getVendorType() {
	return vendorType;
}

Is there a better way to handle this type of validation?

Thanks in advance, 

MG


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org