Skip to content

Commit

Permalink
validation rules
Browse files Browse the repository at this point in the history
  • Loading branch information
b23prodtm committed Dec 16, 2018
1 parent 3cffdd2 commit a1e032b
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions app/Model/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,16 @@ class Message extends AppModel {
public $validationDomain = 'formulaire';
public $validate = array(
'titre' => array(
'required' => array('rule' => 'notBlank', 'required' => true),
'nohtml' => array(
'rule' => 'notags',
'message' => 'Ne peut pas contenir de HTML <tags>.'
)
'Requis' => array('rule' => 'notBlank', 'last' => false),
'Ne peut pas contenir de HTML <tags>.' => array('rule' => 'notags')
),
'texte' => array(
'required' => array('rule' => 'notBlank', 'required' => true),
'safetext' => array(
'rule' => 'notags',
'message' => 'Ne peut pas contenir de HTML <tags>.'
)
'Requis' => array('rule' => 'notBlank', 'last' => false),
'Ne peut pas contenir de HTML <tags>.' => array('rule' => 'notags')
),
'fk_identifiant' => array(
'rule' => 'alphaNumericDashUnderscore',
'message' => "L'identifiant ne peut contenir que des lettres, des nombres, des tirets ou des underscores.",
'required' => true
'rule' => 'alphaNumericDashUnderscore',
'message' => "L'identifiant ne peut contenir que des lettres, des nombres, des tirets ou des underscores."
)
);

Expand Down

0 comments on commit a1e032b

Please sign in to comment.