Added new is_valid_size static method for form validation