格式化

This commit is contained in:
Harvey Zack committed 2018-11-21 19:45:44 +08:00
1 parent 0454f785be
commit 203ad0d3a0
75 files changed
+3120 -2904

No files matched your search

@@ -1,13 +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 (type !== 'string') {
throw new ArtPlayerError(`${paths.join('.')} required 'string' type.`);
}
if (value.trim() === '') {
throw new ArtPlayerError(`${paths.join('.')} can not be empty`);
}
if (value.trim() === '') {
throw new ArtPlayerError(`${paths.join('.')} can not be empty`);
}
return true;
return true;
}