You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 19, 2022. It is now read-only.
Then calling it with await validate() will always pass
Workaround is to manually check if data exists or not
validate(data){if(!data){thrownewError('No data given');}constschema={campaignId: 'required|number',connectionId: 'required|number',objectType: 'required|string'};returnvalidate(data,schema,{},{removeAdditional: true,}).catch(([error])=>{thrownewError(error.message);});}
Maybe could make it as default that it fails or if not default, then perhaps some option like allowEmpty that is set to true by default, so it won't break any existing code
Are you willing to work on it with little guidance?
Yes
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In Indicative version 7.4.4 validation is passing when there is no data to validate and schema contains multiple required fields.
Example code:
Then calling it with
await validate()
will always passWorkaround is to manually check if data exists or not
Maybe could make it as default that it fails or if not default, then perhaps some option like
allowEmpty
that is set to true by default, so it won't break any existing codeAre you willing to work on it with little guidance?
Yes
The text was updated successfully, but these errors were encountered: