[Form] Deprecated max_length and pattern options

Split of issue #9759

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | `max_length` and `pattern` in form options
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -