title: Force a form input in uppercase - onChange and React Hooks
body: <p>I would like to force a form input in uppercase.</p>
  
  <p>I use an <code>onChange</code> method and React Hooks, but it doesn't work and I don't know why... It's pretty basic, but I'm React beginner.</p>
  
  <p>I imported my Redux store on a higher component: <code>props name -&gt; "facture"</code></p>
  
  <pre><code>import React, { useState } from 'react'
  import { Col, Row } from 'mdmrc/lib/components/grid'
  import { Button } from 'mdmrc/lib/components/button'
  import { Form } from 'mdmrc/lib/components/form'
  import { Input } from 'mdmrc/lib/components/input'
  import { useTranslation } from 'react-i18next'
  
  /**
   * composant de mise à jour des données de la facture
   */
  export const UpdateForm = ({ classes, onSubmit, facture }) =&gt; {
    // ajout de la traduction
    const { t } = useTranslation()
  
    const [codePaysValue, setCodePaysValue] = useState(
      facture.codePays ? facture.codePays : ''
    )
  
    const handleChange = e =&gt; {
      const value = e.target.value.toUpperCase()
      setCodePaysValue(value)
    }
  
    /**
     * Controle de surface du formulaire d'update
     */
    const validationOptions = {
      some code here...
    }
  
    return (
      &lt;Col span={12} className={classes.updateForm}&gt;
        &lt;Form
          id="update-form"
          onSubmit={onSubmit}
          validationOptions={validationOptions}
          defaultValues={{
            codePays: codePaysValue ? codePaysValue : '',
          }}
        &gt;
          &lt;Row&gt;
            &lt;Col span={8}&gt;
              &lt;label&gt;{t('updateForm.codePays')}&lt;/label&gt;
            &lt;/Col&gt;
            &lt;Col span={16}&gt;
              &lt;Input
                type="text"
                maxLength={2}
                name="codePays"
                id="codePays"
                onChange={handleChange}
              /&gt;
            &lt;/Col&gt;
          &lt;/Row&gt;
          &lt;Button type="primary" style={{ width: '100%' }} htmlType="submit"&gt;
            {t('updateForm.enregistrer')}
          &lt;/Button&gt;
        &lt;/Form&gt;
      &lt;/Col&gt;
  </code></pre>
  
  <p>No console errors. But my code is always in lowercase if I don't use uppercase letters.</p>