Sign In!
|
New User?Signup Now!
|
Forgot password?
Source Code 4 you
Home
Create Forum Topic
Check WebSite Rank
Publish Articles
UV Web Booster
Contact
Forum Type
Search Engine
.Net C# VB F# VC++
MonoPoject
Java J2EE
Zand Php Cake Php
Oracle Database Server
Mysql Database Server
DB2 Database Server
MSSql Databse Server
Javascript Ajax
Html Xml Xhtml
C Programming
C++ Programming
D Programming
CGI Programming
Perl Programming
Cobol Programming
Pascal Programming
Ruby Programming
Drupal Programming
Automobile
Software Testing
Linux Unix Mac Sun OS
Embedded Systems
Mainframe
IC Microcircuit Chip
Electronics Electrical
Hardware Netwarking
SAP ERP
Logical Reasoning
Human Resources
Science
Agriculture
Accounting
History
Pharmaceutical
Other Topic
Zand Php Cake Php
Posted by :
Cristian Cassina
Validator message not showing
Hi everyone,
I'm dealing with a little problem that I can't simply get rid of.
I have these validation rules in the required model:
var $validate = array(
'name' => array(
'rule' => 'notEmpty',
'message' => 'Il campo codice non può essere
lasciato vuoto'
),
'customer_name' => array(
'rule' => 'notEmpty',
'message' => 'Il codice cliente non può essere vuoto'
),
'grammatura' => array(
'rule' => array('notEmpty', 'numeric'),
'message' => 'la scheda deve avere una grammatura'
)
);
I probably didn't get the thing right, but if I try to submit the view
with any of these fields empty, it flashes me "Object has been saved
correctly", while it didn't save anything.
What am I doing wrong? Is the setFlash method totally independent from
the error message in the validator?
Thank you
Cristian
Posted by :
Bert Van den Brande
Re : Validator message not showing
Are you setting that flash message yourself ?
You can check if a
save has been succesfull or not by looking at the response that comes
back from the $model->save() method ... either true or false.
If you have the better reply, then send it to us. We will display your reply after the approval.
Name :
Email Id :
Reply :