var ValidateSchoolPostForm = function($form)
{
    this.$form = $form;
    this.errors = [];

    this.isValid = function()
    {
        this.data = {
            name:       this.$form.find('input[name=name]').val(),
            email:      this.$form.find('input[name=email]').val(),
            wallpost:   this.$form.find('textarea[name=wallpost]').val(),
            captcha:    this.$form.find('input[name=captcha]').val()
        };

        if (isEmpty(this.data.name))
        {
            this.errors.push(errorMessages.school_wall.name_empty);
        }

        if (isEmpty(this.data.email))
        {
            this.errors.push(errorMessages.school_wall.email_empty);
        }
        else if (!isEmail(this.data.email))
        {
            this.errors.push(errorMessages.school_wall.email_invalid);
        }

        if (isEmpty(this.data.wallpost))
        {
            this.errors.push(errorMessages.school_wall.wallpost_empty);
        }

        if (isEmpty(this.data.captcha))
        {
            this.errors.push(errorMessages.school_wall.captcha_empty);
        }
        else if (parseInt(this.data.captcha) != parseInt($.trim($('#captcha').text())))
        {
            this.errors.push(errorMessages.school_wall.captcha_invalid);
        }


        return (this.errors.length < 1);
    }
}