Would it be possible (and I&#39;m not very familiar with Validations API) for it to validate not just Strings but anything extending CharSequence?  I know Jsoup&#39;s looking for strings, but couldn&#39;t we call toString() on the object passed in?<br>
<br><div class="gmail_quote">On Sun, Jun 12, 2011 at 11:16 AM, George Gastaldi <span dir="ltr">&lt;<a href="mailto:gegastaldi@gmail.com">gegastaldi@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Ok, created a new pull request with the proposed changes:<br>
<br>
<a href="https://github.com/hibernate/hibernate-validator/pull/62" target="_blank">https://github.com/hibernate/hibernate-validator/pull/62</a><br>
<br>
Let me know if there is need of something more.<br>
<br>
Regards,<br>
<br>
George<br>
<br>
2011/6/12 Kevin Pollet &lt;<a href="mailto:pollet.kevin@gmail.com">pollet.kevin@gmail.com</a>&gt;:<br>
<div><div></div><div class="h5">&gt; Hi all,<br>
&gt;<br>
&gt; +1<br>
&gt; I think it&#39;s useful to allow customization of the constraint. As said Shane<br>
&gt; the annotation should provide an enum allowing to use all built-in JSoup<br>
&gt; whitelist and allow the user to specify its whitelist implementation.<br>
&gt; --Kevin<br>
&gt;<br>
&gt; Le dimanche 12 juin 2011 à 13:14, Gunnar Morling a écrit :<br>
&gt;<br>
&gt; Hi George,<br>
&gt;<br>
&gt; I added some comments to your pull request.<br>
&gt;<br>
&gt; With respect to Shane&#39;s whitelist suggestion you might have a value()<br>
&gt; attribute accepting an enumeration with the standard whitelist<br>
&gt; implementations and alternative attribute Class&lt;? extends Whitelist&gt;<br>
&gt; whiteListClass() which allows to specify custom whitelist classes.<br>
&gt;<br>
&gt; --Gunnar<br>
&gt;<br>
&gt;<br>
&gt; 2011/6/12 George Gastaldi &lt;<a href="mailto:gegastaldi@gmail.com">gegastaldi@gmail.com</a>&gt;:<br>
&gt;<br>
&gt; Cool ideas. Will implement it ASAP<br>
&gt;<br>
&gt; Em 12/06/2011, às 02:06, Shane Bryzak &lt;<a href="mailto:sbryzak@redhat.com">sbryzak@redhat.com</a>&gt; escreveu:<br>
&gt;<br>
&gt; Looks good, although I wouldn&#39;t hard code Whitelist.basic() as the<br>
&gt; default... instead I would make Whitelist.relaxed() the default, and then<br>
&gt; perhaps allow the developer to override it by specifying an enum value for<br>
&gt; the validation level allowed on the @WebSafe annotation.  E.g:<br>
&gt;<br>
&gt; // Default would use Whitelist.relaxed()<br>
&gt; private @WebSafe String content;<br>
&gt;<br>
&gt; // This would use the basic whitelist<br>
&gt; private @WebSafe(basic) String content;<br>
&gt;<br>
&gt; // Basic whitelist plus images<br>
&gt; private @WebSafe(basicWithImages) String content;<br>
&gt;<br>
&gt; It would even be nice to somehow allow the developer to specify their own<br>
&gt; whitelist, if you can work out an elegant way to implement it.<br>
&gt;<br>
&gt;<br>
&gt; On 12/06/11 12:46, George Gastaldi wrote:<br>
&gt;<br>
&gt; Hey Shane,<br>
&gt;<br>
&gt; I implemented the @WebSafe annotation you mentioned on Hibenate Validator.<br>
&gt; The pull request is <a href="https://github.com/hibernate/hibernate-validator/pull/61" target="_blank">https://github.com/hibernate/hibernate-validator/pull/61</a><br>
&gt;<br>
&gt; Regards,<br>
&gt;<br>
&gt; George Gastaldi<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; seam-dev mailing list<br>
&gt; <a href="mailto:seam-dev@lists.jboss.org">seam-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/seam-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/seam-dev</a><br>
&gt;<br>
&gt;<br>
<br>
_______________________________________________<br>
seam-dev mailing list<br>
<a href="mailto:seam-dev@lists.jboss.org">seam-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/seam-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/seam-dev</a><br>
</div></div></blockquote></div><br>