Add range validation to LegalFlag