title: java.io.NotSerializableException: org.omnifaces.taghandler.Validator
body: <p>I'm trying to use <strong>Omnifaces's validator</strong> in the following lines of code:</p>
  
  <pre><code>&lt;p:inputText
              value="#{createEventBean.newGuest.name}"&gt;
              &lt;o:validator validatorId="javax.faces.Required"
                                   message="Numbers only" /&gt;
  &lt;/p:inputText&gt;
  </code></pre>
  
  <p>But I get the following error:</p>
  
  <pre><code> DefaultFacele E   Exiting serializeView - Could not serialize state: org.omnifaces.taghandler.Validator
                                   java.io.NotSerializableException: org.omnifaces.taghandler.Validator
  </code></pre>
  
  <p>The most close SO discussion to this issue I find here: <a href="https://stackoverflow.com/questions/18713264/java-io-notserializableexception-org-omnifaces-taghandler-converter">java.io.NotSerializableException - org.omnifaces.taghandler.Converter</a> but I use MyFaces 2.0.3 implementation by Websphere 8.0.0.9 together with PrimeFaces 5.1, can it be the same bug? 
  This lines of code work without any issues:</p>
  
  <pre><code>&lt;p:inputText id="phone" styleClass="mask-num"
                              value="#{adminBean.user.mobilePhone}"&gt;
                              &lt;o:validator validatorId="javax.faces.RegularExpression"
                                  pattern="[0-9-]*" message="Numbers only" /&gt;
                          &lt;/p:inputText&gt;
  </code></pre>
  
  <p>Am I use it wrong or is there workaround for this issue? 
  Thank you.</p>