-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Hi there,
We were using revalidator for a few years to validate both on the backend and on the frontend side, but we finally ran into the same issue as you did in #17. After googling and finding your solution, I decided to migrate our codebase to lx-valid, especially due to your better handling of unknown properties.
While backend migration was smooth, frontend part was completely broken due to assumptions in https://github.com/litixsoft/lx-valid/blob/v1.2.4/lib/lx-valid.js#L513-L515 and https://github.com/litixsoft/lx-valid/blob/v1.2.4/lib/revalidator.js#L800. Namely, we use browserify to bundle everything together and as such the given lines just return empty references, breaking the functionality completely.
In order to benefit from your bugfix and the time invested in making sure all of our backend works with lx-valid, we're now running a locally-patched version without these window checks (just requiring the necessary libs as you would in any other node module); but this is not a decent long-term solution.
Could you guys please look into this and make it such that package managers can bundle lx-valid properly, yet that you expose the additional window logic somehow separately (e.g. only in the CDN build, or such)?
Thanks in advance!