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

the field show null instead of "----" #10

Closed
yatinB07 opened this issue Nov 21, 2018 · 3 comments
Closed

the field show null instead of "----" #10

yatinB07 opened this issue Nov 21, 2018 · 3 comments

Comments

@yatinB07
Copy link

Hi,

I use this package and set the field option disableValidation() to remove the field from the mandatory field list.

But now, in the list and details page the value show me "null" instead of "----".

Can you please guide me how to set the value to "-----" instead of null
screenshot-seasons sr-2018 11 21-16-20-46

@yatinB07
Copy link
Author

@dniccum @batFormat

can you please guide me for the above.

Thanks

@dniccum
Copy link
Owner

dniccum commented Oct 24, 2019

A new bug fix was just pushed to fix the field's issue where it was actively ignoring the ->nullable() method.

Now you can leverage the ->nullValues method to set the null value, see here.

@dniccum dniccum closed this as completed Oct 24, 2019
@cameronmurphy
Copy link

I am having this issue too. This was my attempt:

PhoneNumber::make('Mobile')
    ->sortable()
    ->format('#### ### ###')
    ->country('AU')
    ->linkOnIndex()
    ->linkOnDetail()
    ->nullable()
    ->nullValues([null, 'null'])
    ->rules('max:12'),

But on index and list it still looks like this:
image

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