samedi 9 février 2019

validate power of 2 numbers in Laravel

How could I validate numbers between 1 to 1000 which they are power of 2?

public function rules()
{
  return [
   'threshold' => 'required'|between:1,1000|power??
  ];
}



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire