@receiver(check_student_info)<EOL>def checkRequirements(sender,**kwargs):
if not getConstant('<STR_LIT>'):<EOL><INDENT>return<EOL><DEDENT>logger.debug('<STR_LIT>')<EOL>formData = kwargs.get('<STR_LIT>',{})<EOL>first = formData.get('<STR_LIT>')<EOL>last = formData.get('<STR_LIT>')<EOL>email = formData.get('<STR_LIT:email>')<EOL>request = kwargs.get('<STR_LIT>',{})<EOL>registration = kwargs.get('<STR_LIT>',None)<EOL>customer = Customer.objects.filter(<EOL>first_name=first,<EOL>last_name=last,<EOL>email=email).first()<EOL>requirement_warnings = []<EOL>requirement_errors = []<EOL>for ter in registration.temporaryeventregistration_set.all():<EOL><INDENT>if hasattr(ter.event,'<STR_LIT>'):<EOL><INDENT>for req in ter.event.getRequirements():<EOL><INDENT>if not req.customerMeetsRequirement(<EOL>customer=customer,<EOL>danceRole=ter.role<EOL>):<EOL><INDENT>if req.enforcementMethod == Requirement.EnforcementChoice.error:<EOL><INDENT>requirement_errors.append((ter.event.name, req.name))<EOL><DEDENT>if req.enforcementMethod == Requirement.EnforcementChoice.warning:<EOL><INDENT>requirement_warnings.append((ter.event.name,req.name))<EOL><DEDENT><DEDENT><DEDENT><DEDENT><DEDENT>if requirement_errors:<EOL><INDENT>raise ValidationError(format_html(<EOL>'<STR_LIT>',<EOL>ugettext('<STR_LIT>'),<EOL>mark_safe('<STR_LIT>'.join(['<STR_LIT>' % x for x in requirement_errors])),<EOL>getConstant('<STR_LIT>') or '<STR_LIT>',<EOL>))<EOL><DEDENT>if requirement_warnings:<EOL><INDENT>messages.warning(request,format_html(<EOL>'<STR_LIT>',<EOL>mark_safe(ugettext('<STR_LIT>')),<EOL>mark_safe('<STR_LIT>'.join(['<STR_LIT>' % x for x in requirement_warnings])),<EOL>getConstant('<STR_LIT>') or '<STR_LIT>',<EOL>))<EOL><DEDENT>
Check that the customer meets all prerequisites for the items in the registration.