Skip to content

Commit

Permalink
Add Field::validate().
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
crynobone committed Nov 2, 2019
1 parent aafe218 commit 0992800
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Orderable.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Laravie\QueryFilter;

use Orchestra\Support\Str;
use Illuminate\Support\Str;

class Orderable
{
Expand Down
14 changes: 14 additions & 0 deletions src/Value/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@

class Field extends Column
{
/**
* Validate column.
*
* @return bool
*/
public function validate(): bool
{
if ($this->isRelationSelector() || $this->isJsonPathSelector()) {
return true;
}

return parent::validate();
}

/**
* Is relation selector.
*
Expand Down

0 comments on commit 0992800

Please sign in to comment.