question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

$params set to null

See original GitHub issue

We have a complicated issue with Vue and Vuelidate, basically we’ve made a Vue component library with Vue and Vuelidate. The library is built with Rollup.

Some components are validated like so:

import { maxLength } from 'vuelidate/lib/validators'

...

validations() {
    return {
        value: {
            maxLength: maxLength(4)
        }
    }
}

...

This means the number 4 should be available as a param to be used in an error message. This works in the tests in the lib and also in a standalone Vue app that can be run from the lib. $v.value.$params is consequently defined as so:

{
    maxLength: {
        type: "maxLength",
        max: 4
    }
}

The 4 can then be used in an error message, e.g. “you cannot enter more than 4 characters”.

However, when the lib is imported to another app, the $v.value.$params is set to null. Thus the error message becomes: “you cannot enter more than characters”.

We’ve found a couple of issues on this (https://github.com/vuelidate/vuelidate/issues/302, https://github.com/vuelidate/vuelidate/issues/460) but none of the suggested solutions seems to work.

Any help is appreciated!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:15 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
tada5hicommented, Mar 10, 2022

@dobromir-hristov I refer to changes made from 0.7.4 to 0.7.7 regarding param handling. But the problem which occured there only targets external library which are build on top on vuelidate and released via a bundler e.g. webpack, rollup etc.

This was a major change for this target group but non in your general versioning.

1reaction
leonid-chernyavskiycommented, Feb 22, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

HttpParams set null for call
HttpParams class represents serialized parameters, per the MIME type application/x-www-form-urlencoded. The class is immutable and all mutation ...
Read more >
HttpParams null value gets converted to 'null' query string ...
If a parameter is set or appended with a null value e.g. .set('param', null), this gets converted to param=null.
Read more >
How to set null for integer (or string) parameter?
The stored procedure has integer parameters. ... I have to set the null value explicitly as a value, but it's not possible for...
Read more >
Example of DFHNCTR calls with null parameters
The example that follows illustrates how to issue, from a COBOL program, an NC_CREATE request with some parameters set to null addresses.
Read more >
Amazon QuickSight supports NULL in parameter
Amazon QuickSight now fully support NULL in parameter use. Parameter, as a place holder for single value or multi-value variables, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found