title: How can I display a warning message on the Odoo 10 website?
body: <p>I want to make a condition of a field value in an Odoo 10 form, but I don't know how to do it. I tried to implement this function in models:</p>
  
  <pre><code>@api.model
      def website_form_input_filter(self, request, values):
          if 'titre' in values:
              values['titre'] = values['titre'].strip()
              if len(values['titre']) &lt; 3:
                  raise ValidationError(
                      'Text must be at least 3 characters long')
          return values
  </code></pre>
  
  <p>How can I do it?</p>