Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dont work when we set field as required #177

Open
jayvs6341 opened this issue Jun 29, 2021 · 3 comments
Open

Dont work when we set field as required #177

jayvs6341 opened this issue Jun 29, 2021 · 3 comments

Comments

@jayvs6341
Copy link

$res[] = NovaDependencyContainer::make([
File::make('Upload Apk','package')
->acceptedTypes('.apk')
->deletable(false)
->creationRules('required')
->updateRules('required')

    ])->dependsOn('type', 'android')->onlyOnForms()->creationRules('required')->updateRules('required');
@ragingdave
Copy link
Collaborator

This needs more information for me to investigate anything. The immediate thing I see is that you are using rules on the dependency container directly which isn't how that works. Regardless, you will need to expand what the issue is beyond just a code snippet.

@jayvs6341
Copy link
Author

In this, even though , the filed is required, the user can submit the form without setting the value. The validation is not working.
This is happening with File Field and Select Filed.

Validations works in Text Field.

@celeEtionic
Copy link

Hi! the same problem here, this works for me:

File::make('Upload Apk','package')
->rules('required')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants