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
Clean the body removing values not present in fields param
- body ^map : map to be cleaned
- fields [^string]: string collection with the name of the allowed fields in the map
- opts [^opts-def?](#mop-fields-opts-def): optional options
- **returns** *^map* : cleaned map
validate-and-mop!! [body mandatory accepted & field-message = "Field %s is not present"]
Validates and clean body by executing [validate-mandatory](#validate-mandatory) and `mop-fields`
- body ^uuid : uuid to be converted to string
- mandatory [^string] | [^validation-def](#validation-def) : either coll of strings or map following [^validation-def](#validation-def) specs. For coll of strings, mandatory validation is triggered by default, other validations require the map
- accepted [^string] : collection of strings having accepted keys on body, the others will be removed
- field-message ^string? : optional argument to customize message, used only when mandatory argument is coll of strings
- returns ^map : filtered and validated body
- throws ^ExceptionInfo : exception info with data having bad format type and validation-messages for each field