orchidsoftware / orchidsoftware/platform

validator doesn't work

Open
#2,998 0 comments 0 reactions 1 assignee View on GitHub

@tabuna is already working on this.

Since Apr 14, 2025.

Errors
Dominant language
PHP
Stars
4.8k
Forks
663
Avg merge
1d 9h
Merged PRs (30d)
7

Description

Describe the bug
Validator almost not working:

  1. gte:0 doesn't give any error.
  2. after:plan_start_datetime gives error only when date field is empty, but when it is before plan_start_datetime no errors

To Reproduce

    public function create(Request $request)
    {
        $request->validate([
            'task.name' => 'required|max:255',
            'task.progress' => 'gte:0',
            'task.plan_end_datetime' => 'after:plan_start_datetime',
            'task.deadline' => 'after:plan_end_datetime',

        ]);

        $task = new Task();
        $task->name = $request->input('task.name');
        $task->plan_start_datetime = $request->input('task.plan_start_datetime');
        $task->plan_end_datetime = $request->input('task.plan_end_datetime');
        $task->deadline = $request->input('task.deadline');
        $task->fact_end_datetime = $request->input('task.fact_end_datetime');
        $task->save();
    }

Image

Desktop (please complete the following information):

  • OS: docker-desktop 4.40 on Win10
  • Browser chrome
  • Version 135.0.7049.85

Server (please complete the following information):

  • Platfrom Version: 14.50.1
  • Laravel Version: 12.8.1
  • PHP Version: 8.2.8
  • Database: mariadb
  • Database Version: 11.7.2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.