擅长:python、mysql、java
<pre><code>def non_empty_string(s):
if not s:
raise ValueError("Must not be empty string")
return s
parser.add_argument('name', required=True, nullable=False, type=non_empty_string)
</code></pre>
<p>我是从下面提到的<a href="https://github.com/flask-restful/flask-restful/issues/741" rel="nofollow noreferrer">link</a></p>