Validate fields using property file and ResourceBundleMessageInterpolator

Posted: February 11, 2013 in web


<p:inputText value="#{}" />
<p:inputText value="#{}" />

Backing Bean

@NotBlank(message = "{}")
private String email;

@NotBlank(message = "{}")
private String name;

public class MessageInterpolator extends ResourceBundleMessageInterpolator {
    public MessageInterpolator() {
        super(new PlatformResourceBundleLocator(""));

Validation.xml (scr/main/resources/META-INF)

	xsi:schemaLocation=" validation-configuration-1.0.xsd">



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s