update docs

This commit is contained in:
Harvey Zack committed 2018-11-08 15:35:07 +08:00
1 parent a0bc4d3a39
commit 1388df955f
16 files changed
+11133 -59

No files matched your search

@@ -0,0 +1,13 @@
import { ArtPlayerError } from '../utils';
export default function validStringEmpty(paths, value, type) {
if (type !== 'string') {
throw new ArtPlayerError(`${paths.join('.')} required 'string' type.`);
}
if (value.trim() === '') {
throw new ArtPlayerError(`${paths.join('.')} can not be empty`);
}
return true;
}