title: Livewire validateOnly with validate in the same component
body: <p>I have a little problem with the data validation with <strong>livewire</strong> ( laravel ).</p>
  <p>I noticed that when I set up the validation in real time ( <strong>validateOnly()</strong> ), the information entered in the form is validated in real time. At this level everything is fine.</p>
  <p>But when I click on the button to submit the form (even though the form contains errors), the form is unfortunately sent to my function defined in the <strong>wire:submit</strong>.</p>
  <p>So my question is : is it possible to revalidate the information in the <strong>wire:submit</strong> method that receives the data after the form is submitted ? If so, how can I do that?</p>
  <p>PS: I tried to set the validate method in my wire:submit function but nothing happens. It blocks the form from being submitted but it doesn't give me an error .</p>
  <p>My source code :</p>
  <pre><code>&lt;?php
  class UserProfile extends Component
  {
      use WithFileUploads;
  
      public $countries = [];
      public $profile = [];
  
      protected function rules() {
          if ( !LivewireUpdateProfileRequest::authorize() ) {
              return abort(403, &quot;Your are not authorized to make this request !&quot;);
          }
          $rules = LivewireUpdateProfileRequest::rules();
  
          if ( !empty($this-&gt;profile['phone']) ) {
              $rules['profile.phone'] = [ 'required', 'phone_number:' . $this-&gt;profile['phone'] ];
          }
  
          return $rules;
      }
  
  
      public function mount()
      {
          $this-&gt;countries = Countries::all();
          $this-&gt;profile = Auth::user()-&gt;toArray();
      }
  
  
      public function updateUserProfile()
      {
          $validatedData = $this-&gt;validate();
          dd( $validatedData );
      }
  
      public function updated($key, $value)
      {
          $this-&gt;validateOnly($key);
      }
  
  
      public function render()
      {
          return view('livewire.user-profile');
      }
  }
  </code></pre>
  <p>Html source :</p>
  <pre><code> &lt;form action=&quot;&quot; method=&quot;POST&quot; wire:submit.prevent=&quot;updateUserProfile&quot;&gt;
      &lt;input name=&quot;profile.email&quot; type=&quot;email&quot; wire:model=&quot;profile.email&quot; /&gt;
      @error('profile.email') {{ $message }} @enderror
  
      &lt;input name=&quot;profile.phone&quot; type=&quot;tel&quot; wire:model=&quot;profile.phone&quot; /&gt;
      @error('profile.phone') {{ $message }} @enderror
  &lt;/form&gt;
  </code></pre>
  <p>Here is LivewireUpdateProfileRequest content :</p>
  <pre><code>&lt;?php
  
  namespace App\Http\Requests\Web;
  
  use Illuminate\Foundation\Http\FormRequest;
  
  class LivewireUpdateProfileRequest extends FormRequest
  {
      /**
       * Determine if the user is authorized to make this request.
       *
       * @return bool
       */
      public static function authorize()
      {
          return true;
      }
  
      /**
       * Get the validation rules that apply to the request.
       *
       * @return array
       */
      public static function rules()
      {
          return [
              'profile' =&gt; ['required', 'array', 'size:10'],
              'profile.firstname' =&gt; ['required', 'string'],
              'profile.lastname' =&gt; ['required', 'string'],
              'profile.email' =&gt; ['required', 'email'],
              'profile.phone' =&gt; ['required', 'phone_number:33'],
              'profile.gender' =&gt; ['required', 'gender'],
              'profile.image' =&gt; ['sometimes', 'image', 'mimes:png,jpg,jpeg'],
              'profile.address' =&gt; ['required', 'string'],
              'profile.city' =&gt; ['required', 'string'],
              'profile.country_id' =&gt; ['required', 'exists:countries,id'],
              'profile.birth_at' =&gt; ['required', 'date', 'min_age:18'],
          ];
      }
  }
  </code></pre>