I believe if txtminLength value is greater than txtmaxlength value, then it shouldnt save into database.
int min;
int max;
Int32.TryParse(txtminLength.Text.ToString(),out min);
Int32.TryParse(txtmaxLength.Text.ToString(),out max);
if(min<max)>
{
}
else
{
}