Added ValidationException class in app_exception.php.
Added helpers/validation_helper.php. Added call to validation_helper in config/bootstrap.php.
Added validation rule in models/comment.php.
Added comment validation in the write() method in models/thread.php.