perf[utils]: optimizate variable name

This commit is contained in:
Pan
2019-02-19 10:24:22 +08:00
parent 070a3343f2
commit fe950801c9
5 changed files with 23 additions and 25 deletions

View File

@@ -71,7 +71,7 @@
</template>
<script>
import { isvalidUsername } from '@/utils/validate'
import { validUsername } from '@/utils/validate'
import LangSelect from '@/components/LangSelect'
import SocialSign from './socialsignin'
@@ -80,7 +80,7 @@ export default {
components: { LangSelect, SocialSign },
data() {
const validateUsername = (rule, value, callback) => {
if (!isvalidUsername(value)) {
if (!validUsername(value)) {
callback(new Error('Please enter the correct user name'))
} else {
callback()