You can overlay the Granite UI from the page properties, and provide the maxlength property. Example like (maximum length is 100 characters):
<title
jcr:primaryType="nt:unstructured"
required="true"
name="./jcr:title"
maxlength="100"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"/>