<?php
/********************************************************************************
 * (c)1337 aheadware.com - All rights reserved
 ********************************************************************************/


class TB_Shared_Utils_Validator extends Francis_Utils_Validator {

    public static function isValidPassword( $pass ) {
        $valid = false;
        if ( TB_Shared_Ent_Core_Account::PASSWORD_MINIMUM_CHARS <= strlen( $pass ) &&
             TB_Shared_Ent_Core_Account::PASSWORD_MAXIMUM_CHARS >= strlen( $pass ) ) {
            $valid = true;
        }

        return $valid;
    }

    public static function isValidName( $name ) {
        return !(empty( $name ) );
    }

    public static function isValidValue( array $validValues, $value ) {
        return in_array( $value, $validValues );
    }
} 