added minimum lengths into error messages