Let us say that the user submits a form. One of the fields was invalid, so the form gets re-rendered. When in the process of re-rendering the form: I check to see if the submitted value for that attribute was invalid. If so: then show that invalid data entry with some additional text.

Here is what I have so far. It is close but isn't working completely:

```
<%= form_for(blog) do |f| %>
  <div class="field">
    <%= f.label :age %>

    <% if f.object.age %>
      <% if f.object.errors.include?(:age) %>
        <%= f.text_field :age, value: "Submitted: #{f.object.age} was bad" %>
      <% else %>
        <%= f.text_field :age %>
      <% end %>
    <% else %>
      <%= f.text_field :age %>
    <% end %>

  </div>

  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>

```

So I am saying: "Hey Rails: if the user has already submitted this form, *and* the value the user submitted for this attribute of `age` was invalid, then re-render the submitted value within the input, along with some additional text." 

The issue I am having is that it will not show the error input correctly. For example: if the user inputs "abcd" into the input field, then when the form re-renders upon failing validations, the input field *should* say: "Submitted: abcd was bad". Instead it says "Submitted: 0 was bad".

I am close. The ultimate question is: Why is it displaying `0`? Why isn't it displaying `"abcd"`? The next question is: "How can I make it display `"abcd"`?

Is this behavior because I have the following validation? :

```
    validates :age, numericality: true

```

If so: how can I have the validation to ensure it is a number, but also re-display the value the user entered?