Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
ypl_mobile_web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
邓丽
ypl_mobile_web
Commits
05dcc083
Commit
05dcc083
authored
Apr 18, 2016
by
庄欣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
后台开发版本
parent
36a62fdb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
1 deletions
+44
-1
app/config/loader.php
+3
-1
app/validation/WorksValidation.php
+41
-0
No files found.
app/config/loader.php
View file @
05dcc083
...
...
@@ -8,6 +8,7 @@ $loader->registerDirs([
$loader
->
registerNamespaces
(
[
'lib'
=>
$config
->
application
->
library
,
'config'
=>
'./app/config'
'config'
=>
'./app/config'
,
'validattion'
=>
'./app/validation'
]
)
->
register
();
\ No newline at end of file
app/validation/WorksValidation.php
0 → 100644
View file @
05dcc083
<?php
namespace
validattion
;
use
Phalcon\Validation
;
use
Phalcon\Validation\Validator\StringLength
;
use
Phalcon\Validation\Validator\PresenceOf
;
use
Phalcon\Validation\Validator\Between
;
//相册验证
class
WorksValidation
extends
Validation
{
public
function
initialize
()
{
//相册名称
$this
->
add
(
"title"
,
new
PresenceOf
([
'message'
=>
'请填写套系名称'
]));
$this
->
add
(
'title'
,
new
StringLength
([
'max'
=>
15
,
'min'
=>
2
,
'messageMaximum'
=>
'套系名称必须15字以下'
,
'messageMinimum'
=>
'套系名称2个字以上'
]));
//图片
$this
->
add
(
"cover"
,
new
PresenceOf
([
'message'
=>
'请选择封面'
]));
//价格
$this
->
add
(
"price"
,
new
PresenceOf
([
'message'
=>
'请填写套系价格'
]));
$this
->
add
(
"price"
,
new
Between
([
'minimum'
=>
1
,
'maximum'
=>
100000
,
'message'
=>
'价格须在1元以上,100,000以下'
]));
//使用积分
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment