Produce only one validation message for a column in rails
<p>I am now trying to develop api in rails. I want to display validation message for the field <em>email</em> and <em>houseno</em> field .In my model I have added the below code for validation of email</p>

<pre><code>validates :email, format: { with: /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i}, uniqueness: true
validates :email_confirmation, presence: true, if: :not_recovering_password, on: :create
validates :email, confirmation: true, email_format: {message: 'Invalid E-mail address'}, if: :not_recovering_password, on: :create
</code></pre>

<p>validation for houseno</p>

<pre><code>validates :houseno,    presence: true, numericality: true, length: {minimum: 3, maximum: 3}
</code></pre>

<p>But when I give an empty string for houseno and email. It produced multiple validation error.</p>

<pre><code>   "errors": {
"email": [
  "Please enter your e-mail address",
  "There is an error in the input value of"
],  
"houseno": [
  "Please enter a houseno",
  "Please enter a numeric value is",
  "Please enter three or more characters"
],
</code></pre>

<p>How can I get only the first validation message. Please help to solve the issue. Thanks in advance</p>