title: How to declare enum in validation file request for usertype
body: <p>hello i got a problem to declare a enum validation role in my table user, this is my code for store new user</p>
  <pre><code>    public function rules(){
          return [
              'name' =&gt; 'required|string|max:255',
              'email' =&gt; 'required|unique:users|max:255',
              'role' =&gt; 'required|enum_value:' . UserType::class,
              'password' =&gt; ['required', 'string', 'confirmed', Password::min(8)
                  -&gt;mixedCase()
                  -&gt;letters()
                  -&gt;numbers()
                  -&gt;symbols()
                  -&gt;uncompromised()],
          ];
      }
      public function messages()
      {
          return [
              'name.required'    =&gt; 'Name for user is required',
              'role.required'    =&gt; 'Role user is required',
              'email.required'    =&gt; 'Email user is required',
              'email.unique'      =&gt; 'The email has already been taken. Try another email.',
              'password.required'    =&gt; 'Password user is required',
          ];
      }
  
      protected function failedValidation(Validator $validator)
      {
          return Alert::error(' Error Tambah Data ', ' Silahkan Periksa Kembali');
      }
      
  </code></pre>
  <p>and this is the blade for input the role</p>
  <pre><code>  &lt;div class=&quot;form-group&quot;&gt;
      &lt;label for=&quot;role&quot;&gt;Role&lt;/label&gt;
      @if(isset(Auth::user()-&gt;role))
      @if(Auth::user()-&gt;role === 1)
      &lt;input type=&quot;text&quot; class=&quot;form-control @error('name') is-invalid @enderror&quot; id=&quot;role&quot; placeholder=&quot;Writer&quot; name=&quot;role&quot; value=&quot;2&quot; required autocomplete=&quot;name&quot; autofocus readonly&gt;
      @else
      &lt;select class=&quot;form-select @error('role') is-invalid @enderror&quot; name=&quot;role&quot; id=&quot;roleCreate&quot;&gt;
        &lt;option selected&gt;Select Role&lt;/option&gt;
        @foreach ($arrUserType as $status=&gt;$value)
        &lt;option value=&quot;{{ $value }}&quot;&gt;{{ $status }}&lt;/option&gt;
        @endforeach
      &lt;/select&gt;
      @endif
      @endif
      @error('role')
      &lt;div class=&quot;invalid-feedback&quot;&gt;{{ $message }}&lt;/div&gt;
      @enderror
    &lt;/div&gt;
  </code></pre>
  <p>and this is the controller</p>
  <pre><code>    public function store(UserPostRequest $request)
      {
          $validated = $request-&gt;validated();
          // dd($validated);
          $validated['password'] = Hash::make($validated['password']);
          $userId = $this-&gt;userService-&gt;storeUser($validated);
          Alert::success(' Berhasil Tambah Data ', ' Silahkan Periksa Kembali');
          return redirect()-&gt;route('users.index');
      }
  </code></pre>
  <p>I always get the error message &quot;<strong>The value you have entered is invalid.</strong>&quot;
  in my opinion, I have a mistake in a declare validation request because the validation give an error message, I make this role with enum BenSampo/laravel-enum</p>
  <p>so how to fixed it this error?, thank you !</p>