Skip to content

Required_without validation rule #1007

Description

@Iamscalla

The above subject does not act as its supposed to, the only part it handles is if the rule field is not available in the request.

before the loop, at this line that has this:
$present = $this->required($data[$str] ?? null); it's should be $present = $this->required($str ?? null); since $str is more of a field in the request.

Then in the field loop, within the array key check, it's supposed to run this way:
if(!array_key_exists($field, $data) || (isset($data[$field]) && empty($data[$field])){
return false:
}

pardon my no code formating, as am on mobile.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugVerified issues on the current code behavior or pull requests that will fix themwaiting for infoIssues or pull requests that need further clarification from the author

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions