Laravel Vue SPA - 表单验证
打赏作者

乔泓恺-Jone

请问:接下来会讲到vee和laravel5.5 中的make:rules 结合 该如何使用吗?

liunanmp3

老师求更新啦

JellyBool 回复 liunanmp3

嗯,很快就会更新的。

zhujie

问下要变成自己指定的错误中文提示要怎么弄呢?

JellyBool 回复 zhujie

马上就会出这个的。

wangsong1234

只前端验证的话,我们的测试会提bug。。。验证这块也是做的非常严格,需要这样吗?

JellyBool 回复 wangsong1234

这个明显后端也有验证的啊

y7ut123

v-validate="{rules:{required: true ,min: 6,confirmed: password } }" confirmed 后面没有 ‘’吧 我使用confirmed :‘password’ 有bug

JellyBool 回复 y7ut123

单引号有 bug ?

dyxxxyd 回复 JellyBool

是的,去掉单引号就可以了

不了了了了了之

是不是不能删除自己的评论

JellyBool 回复 不了了了了了之

不能的貌似。。

不了了了了了之 回复 JellyBool

就会导致我post一个问题以后,发现问题解决了,就没办法删掉。。。我就回来改成了这个

而且,不能回复自己的评论

JellyBool 回复 不了了了了了之

其实我个人觉得没必要删除,最好就是在原来的评论后面贴上解决方案。这样对自己和后面的人来说,都是一次经验

sunlonghb

npm ERR! path E:\WWW\laravel51\node_modules\browser-sync-client\node_modules\fresh
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename ‘E:\WWW\laravel51\node_modules\browser-sync-client\node_modules\fresh’ -> 'E:\WWW\laravel51\node_modules\browser-sync-client\node_modules\fresh’
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

JellyBool 回复 sunlonghb

你用的是什么版本的 laravel 和 vuejs,这个其实直接用 laravel 的 elixir 或者是 5.4 之后的 mix 就行了。

sunlonghb 回复 JellyBool

我用的laravel5.1 公司是这个版本我就用的这个版本 vue是2.5

sunlonghb 回复 JellyBool

“devDependencies”: {
“bootstrap-sass”: “^3.3.7”,
“gulp”: “^3.9.1”,
“jquery”: “^3.1.0”,
“laravel-elixir”: “^6.0.0-9”,
“laravel-elixir-browsersync-official”: “^1.0.0”,
“laravel-elixir-vue-2”: “^0.2.0”,
“laravel-elixir-webpack-official”: “^1.0.2”,
“lodash”: “^4.14.0”,
“vue”: “^2.5.9”,
“vue-html-loader”: “^1.2.4”,
“vue-loader”: “^13.5.0”,
“vue-resource”: “^0.9.3”,
“vue-style-loader”: “^3.0.3”,
“vue-template-compiler”: “^2.5.9”,
“vuex”: “^2.0.0”,
“axios”: “^0.17.1”,
“vue-axios”: “^2.0.2”
},

JellyBool 回复 sunlonghb

删除 node_modules/ 再重新安装,elixir 参照这个应该:https://github.com/laravel/laravel/blob/v5.1.4/package.json

sunlonghb 回复 JellyBool

老是问下 access是啥目录 怎么npm install 报错
npm ERR! path E:\WWW\laravel51\node_modules\sequencify
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall access
npm ERR! enoent ENOENT: no such file or directory, access 'E:\WWW\laravel51\node_modules\sequencify’
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

sunlonghb

npm install vee-validate@next --save 安装后报错

sunlonghb

npm ERR! path E:\WWW\laravel51\node_modules\sequencify
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall access
npm ERR! enoent ENOENT: no such file or directory, access 'E:\WWW\laravel51\node_modules\sequencify’
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Program Files\nodejs\node_cache_logs\2017-12-10T13_01_49_961Z-debug.log

JellyBool 回复 sunlonghb

sequencify 这个 modules 没有

liujun

1.v-validate里面不需要写rule了,参照github;
2,bootstrap4里面已经取消了has-error等,换成了invalid-feedback和 valid-feedback

dope2008

提示怎么样做成中文

JellyBool 回复 dope2008

这个后面貌似有讲的吧

dope2008 回复 JellyBool

好久没有更新了

kuoyeh2019

评论好有用啊,confirmed:password 单引号有错误 ,可能是版本的问题。试出问题才有提高。