Created
June 21, 2024 15:10
-
-
Save Gummibeer/889c4f6bd30aa0a046f41ce63867a6c0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class CreateTenantRequest extends Formrequest | |
{ | |
public function rules(): array | |
{ | |
return [ | |
'name' => ['required', 'string', 'max:255'], | |
'settings' => ['required', 'array', 'contrains:timezone,currency'], | |
]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Your HTML form will look like:
The
contrains
validation will ensure that Timezone and Currency have to be always ticked (be present in the settings array as value).The request payload should look like: