How can I set a min and max length on form fields?

After adding the form element and creating several fields, how can I set the min and max length of each field?