# fluent-cart/1.6.4/app/Http/Requests/LabelRequest.php

FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler, version 1.6.4. 44 lines.

- Page: https://pluginprobe.com/plugins/fluent-cart/1.6.4/code/app/Http/Requests/LabelRequest.php
- Raw: https://pluginprobe.com/plugins/fluent-cart/1.6.4/raw/app/Http/Requests/LabelRequest.php
- Modified: 2025-10-14T16:36:46+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/fluent-cart/1.6.4/code/app/Http/Requests/LabelRequest.php#L10-L20`.

```php
<?php

namespace FluentCart\App\Http\Requests;

use FluentCart\Framework\Foundation\RequestGuard;

class LabelRequest extends RequestGuard
{

    /**
     * @return array
     */
    public function rules()
    {
        return [
            'value' => 'required|sanitizeText|unique:fct_label,value',
        ];
    }

    /**
     * @return array
     */
    public function messages()
    {
        return [
            'value.required' => esc_html__('Label field is required.', 'fluent-cart'),
            'value.unique'   => esc_html__('Label must be unique.', 'fluent-cart'),
        ];
    }

    /**
     * @return array
     */
    public function sanitize()
    {
        return [
            'id'           => 'intval',
            'value'        => 'sanitize_text_field',
            'bind_to_type' => 'sanitize_text_field',
            'bind_to_id'   => 'sanitize_text_field',
        ];
    }
}

```
