<?php

namespace WPUltimateSecurity\UltimateSecurity\Support\Validation;

/**
 * Validation Rule Interface
 *
 * All validation rules must implement this interface.
 *
 * @package WPUltimateSecurity\UltimateSecurity\Support\Validation
 * @since 2.0.0
 */
interface ValidationRuleInterface
{
    /**
     * Validate the given value.
     *
     * @param mixed  $value The value to validate.
     * @param string $field The field name (for error messages).
     * @param array  $data  The full data array (for cross-field validation).
     *
     * @return bool True if valid, false otherwise.
     */
    public function validate(mixed $value, string $field, array $data = []): bool;

    /**
     * Get the error message for this rule.
     *
     * @param string $field The field name.
     *
     * @return string The error message.
     */
    public function getMessage(string $field): string;

    /**
     * Get the rule name.
     *
     * @return string
     */
    public function getName(): string;
}
