title: How to create and use a more domain-specific validation rule in Laravel?
body: <p>First of all, I am really in the beginner stage of Laravel. So, please excuse me and help me out.</p>
  
  <p>I am trying to build an app using just Laravel (for learning purpose) where I am creating a Form using the <strong>Laravel Collective</strong>. I have learnt how to create a Form and send those values to Database and show it on the site.</p>
  
  <p>However, what I am trying to do is I want to run few functions for one of the input (Suppose if a string field called "operator" has this value-> "+" then it will run the <strong>Addition function</strong>.) My approach is this: Create a Controller and add this <code>public function addition($operator, $value1, $value2)</code> in the function check <code>if($operator== '+')</code> then do this. Am I going in the right direction? </p>
  
  <p>I have one more queries, I know how to validate the fields of a form by doing this for example in the store function of a controller : <code>$this-&gt;validate(request, ['text'=&gt; 'required|max:999']);</code></p>
  
  <p>What I am trying to figure out is how to just make sure that only the Four Major Arithmetic Operators are allowed to take as an Input. Otherwise it won't work. So, can you guys guide me on this?</p>