Is it possible to validate an input field conditionally based on the value of another input?
For example, there is an input type which can have the values letters or numbers and then there is another field which contains the value input.
I want that the value input validation rule will be alpha if type is letters and numeric if type is numbers
I am already using the pipe type of validation in the rules method:
public function rules()
{
return [
"type" => 'required',
"value" => 'required|min:1|max:255',
];
}