0

I am using fluent-json-schema for input validation. However I was wondering whether we can have custom function/hook before doing certain validations. For example let's take a very simple json such as;

`
   {
       "loginid:"",
       "password":""
   }
`

In this case additionally to the provided validation methods I would like to;

  1. Trim() the data so that whitespaces are removed. May be I can have a custom transform as in here (is it possible in fluent-json-schema library)?

  2. Then validate for empty string ("") as well.

Is there a way to do this using fluent-json-schema

easleyfixed
  • 219
  • 1
  • 13
user2058413
  • 691
  • 3
  • 10
  • 28

0 Answers0