Skip to content
Permalink
Browse files

fix: pass rawValue to validate function

  • Loading branch information...
dariocravero committed Sep 16, 2019
1 parent ac362d4 commit e739e89fb829e38abe71b0f96c69ecbe495dfb90
Showing with 4 additions and 3 deletions.
  1. +3 −2 ensure-data.js
  2. +1 −1 package.json
@@ -103,11 +103,12 @@ export let useCaptureItem = ({
return {};
}
let value = format.in(get(item, path));
let rawValue = get(item, path);
let value = format.in(rawValue);
let isValid =
validate && (touched.current || (required && item._forceRequired))
? fromValidate[validate](value)
? fromValidate[validate](rawValue, value)
: true;
let onChange = value => {
touched.current = true;
@@ -1,6 +1,6 @@
{
"name": "@viewstools/morph",
"version": "19.10.3",
"version": "19.10.4",
"description": "Views language morpher",
"main": "index.js",
"type": "module",

0 comments on commit e739e89

Please sign in to comment.
You can’t perform that action at this time.