public static function money($check, $symbolPosition = 'left')
    {
        $money = '(?!0,?\d)(?:\d{1,3}(?:([, .])\d{3})?(?:\1\d{3})*|(?:\d+))((?!\1)[,.]\d{1,2})?';
        if ($symbolPosition === 'right') {
            $regex = '/^' . $money . '(?<!\x{00a2})\p{Sc}?$/u';
        } else {
            $regex = '/^(?!\x{00a2})\p{Sc}?' . $money . '$/u';
        }

        return static::_check($check, $regex);
    }
public static function money($check, $symbolPosition = 'left')
    {
        $money = '(?!0,?\d)(?:\d{1,3}(?:([, .])\d{3})?(?:\1\d{3})*|(?:\d+))((?!\1)[,.]\d{1,2})?';
        if ($symbolPosition === 'right') {
            $regex = '/^' . $money . '(?<!\x{00a2})\p{Sc}?$/u';
        } else {
            $regex = '/^(?!\x{00a2})\p{Sc}?' . $money . '$/u';
        }

        return static::_check($check, $regex);
    }
public static function money ( $ check , $ symbolPosition = 'left' ) { $ money = '(?!0,?\d)(?:\d{1,3}(?:([, .])\d{3})?(?:\1\d{3})*|(?:\d+))((?!\1)[,.]\d{1,2})?' ; if ( $ symbolPosition === 'right' ) { $ regex = '/^' . $ money . '(?<!\x{00a2})\p{Sc}?$/u' ; } else { $ regex = '/^(?!\x{00a2})\p{Sc}?' . $ money . '$/u' ; } return static :: _check ( $ check , $ regex ) ; }
Checks that a value is a monetary amount.

@param string $check Value to check
@param string $symbolPosition Where symbol is located (left/right)
@return bool Success
Checks that a value is a monetary amount .