@XBlock.json_handler<EOL><INDENT>def validate_form(self, data, suffix='<STR_LIT>'):<DEDENT>
msg = validate_seeded_answers(data['<STR_LIT>'], data['<STR_LIT>'], data['<STR_LIT>'])<EOL>options_msg = validate_options(data)<EOL>if msg is None and options_msg is None:<EOL><INDENT>return {'<STR_LIT:success>': '<STR_LIT:true>'}<EOL><DEDENT>else:<EOL><INDENT>msg = msg if msg else {}<EOL>options_msg = options_msg if options_msg else {}<EOL>msg.update(options_msg)<EOL>raise JsonHandlerError(<NUM_LIT>, msg)<EOL><DEDENT>
Validate edit form from studio.

This will check if all the parameters set up for peer instruction question satisfy all the constrains defined
by the algorithm. E.g. we need at least one seed for each option for simple algorithm.

Args:
    data (dict): form data
    suffix (str): not sure

Returns:
    dict: {success: true} if there is no problem

Raises:
    JsonHandlerError: with 400 error code, if there is any problem. This is necessary for angular async form
        validation to be able to tell if the async validation success or failed