Skip to content

How to validate an Object with optional properties ? #713

Closed Answered by fabian-hiller
EminDevNoth asked this question in Q&A
Discussion options

You must be logged in to vote

I recommend using input && typeof input === 'object' && input.constructor === Object, since the name of a constructor can be easily manipulated. Here are related issues: #587, #602, #608.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@fabian-hiller
Comment options

Answer selected by EminDevNoth
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants