1
0
Fork 0

Cast value to string before validating

* src/validate/BucketDataValidator.js (_forEach): Cast data to string
  before passing to formatter, which expects a string.
master
Mike Gerwitz 2017-06-29 14:17:17 -04:00
parent 37cb6716de
commit 0401860377
1 changed files with 2 additions and 1 deletions

View File

@ -257,7 +257,8 @@ module.exports = Class( 'BucketDataValidator',
// format return values for display
try
{
ret[ i ] = fmt[ method ].call( fmt, value );
// validators expect strings
ret[ i ] = fmt[ method ].call( fmt, ''+value );
}
catch ( e )
{