<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=jondaly@firstdata.com" rel="nofollow">Jon Daly</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-7062?redirect=false" rel="nofollow">SPR-7062</a></strong> and commented</p>
<p dir="auto">Would like a replacement for <code class="notranslate">@Valid</code> that could take group classes for JSR-303 validation. Right now only the default group class of JSR-303 Constraints is run for the <code class="notranslate">@Valid</code>.</p>
<p dir="auto">Please refer to this forum thread for more detail: <a href="http://forum.springsource.org/showthread.php?p=292566" rel="nofollow">http://forum.springsource.org/showthread.php?p=292566</a></p>
<hr>
<p dir="auto"><strong>Reference URL:</strong> <a href="http://forum.springsource.org/showthread.php?p=292566" rel="nofollow">http://forum.springsource.org/showthread.php?p=292566</a></p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a href="https://jira.spring.io/browse/SWF-1453" rel="nofollow">SWF-1453</a> Support JSR303 Validation Groups for Webflow View States (<em><strong>"is depended on by"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398099327" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11039" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11039/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11039">#11039</a> Support for validation groups in <code class="notranslate">@Valid</code> used by spring MVC (<em><strong>"duplicates"</strong></em>)</li>
</ul>
<p dir="auto">18 votes, 14 watchers</p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=cwidhelm" rel="nofollow">Chris Widhelm</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-2002?redirect=false" rel="nofollow">SPR-2002</a></strong> and commented</p>
<p dir="auto">When calling ServletRequestUtils.getRequiredStringParameters or ServletRequestUtils.getStringParameters the following chunk of code throws a ServletRequestBindingException if there is an empty String as one of the parameter values.  I would argue that an empty String is a value when dealing with a String.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="	protected final void validateRequiredParameter(String name, Object parameter)
			throws ServletRequestBindingException {

		if (parameter == null) {
			throw new ServletRequestBindingException(&quot;Required &quot; + getType() + &quot; parameter '&quot; + name
					+ &quot;' is not present&quot;);
		}
		if (&quot;&quot;.equals(parameter)) {
			throw new ServletRequestBindingException(&quot;Required &quot; + getType() + &quot; parameter '&quot; + name
					+ &quot;' contains no value&quot;);
		}
	}"><pre class="notranslate"><code class="notranslate">	protected final void validateRequiredParameter(String name, Object parameter)
			throws ServletRequestBindingException {

		if (parameter == null) {
			throw new ServletRequestBindingException("Required " + getType() + " parameter '" + name
					+ "' is not present");
		}
		if ("".equals(parameter)) {
			throw new ServletRequestBindingException("Required " + getType() + " parameter '" + name
					+ "' contains no value");
		}
	}
</code></pre></div>
<hr>
<p dir="auto"><strong>Attachments:</strong></p>
<ul dir="auto">
<li><a href="https://jira.spring.io/secure/attachment/11632/ServletRequestUtilsTest.java" rel="nofollow">ServletRequestUtilsTest.java</a> (<em>986 bytes</em>)</li>
</ul>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398065891" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/6686" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/6686/hovercard" href="https://github.com/spring-projects/spring-framework/issues/6686">#6686</a> ServletRequestUtils.getStringParameters behaviour with <em>empty</em> (not null) Strings is unintuitive (<em><strong>"duplicates"</strong></em>)</li>
</ul>