26. moodleform::validation() $data = contains all the values set on submitting the value. $data is array which contains value in following form: $data[‘elementname’] Example: $s = $data[‘shortname’]; $error = is an array which stores error, while validating the submitted data. Syntax: $error[‘elementname’] Where, elementname should be same as name given while creating form.
27. Cont… $files in validation function is extra parameter for validating the files which are to be uploaded to system