Added support for max_lenth and min length.