Re: Data Validation not working

2010-03-18 Thread Henrique Machado
Linux is case sensitive, windows isn't At Linux, You can have at the same directory the files: inventory.php and Inventory.php Henrique Machado TI Expert 2010/3/19 SeeVik > Hello all > > Thanks for guiding me out of this problem. > > @ Dr. Loboto - Yes that was the problem. The model filename

Re: Data Validation not working

2010-03-18 Thread SeeVik
Hello all Thanks for guiding me out of this problem. @ Dr. Loboto - Yes that was the problem. The model filename was Inventory.php. As soon as I changed it to inventory.php, it worked like a charm. Although why it worked on Windows local server and not on Linux web server is what I don't get. Any

Re: Data Validation not working

2010-03-17 Thread logout
I also vote for problems in the path/filename. Be sure exactly what file you edit (the model) - I had exactly the same problem - it turned out that i was editing a wrong file. When I opened the correct one, all worked fine. Your file for the model is inventory.php in the app/models, right? Check

Re: Data Validation not working

2010-03-17 Thread WebbedIT
@sooraj: If using the form helper it automatically includes validation errors unless your suppress it by setting error=>false Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed

Re: Validation issues for Contact form (doesn't use database)

2010-03-17 Thread WebbedIT
Haven't read the post in full but think I have something that will help. I have a recurring comments form at the bottom of various modules across my portal site and I created it with the following: $form->create(null, array('url'=>array('action'=>'comment', '#commentForm'), 'id'=>'commentForm'));

Re: Validation issues for Contact form (doesn't use database)

2010-03-16 Thread Johnny Ferguson
Now here's a tricky extension (still determined to avoid AJAX). When my form fails, and validation errors pop up, how could I have the page jump to an anchor link connected to the form? The top section of my page is somewhat large, so I'd like to avoid excessive scrolling with an a

Re: Validation issues for Contact form (doesn't use database)

2010-03-16 Thread Johnny Ferguson
Having the form submit to the index() function worked brilliantly. To my surprise, this enabled the automagic validation messages! All I have to do now is style the messages with CSS, and I have the trickiest part of my project done. I'll be sure to post a link to the blog post I plan to wri

Re: Validation issues for Contact form (doesn't use database)

2010-03-16 Thread Johnny Ferguson
guson wrote: > > > > > Hi, > > > I've poured over all the documentation I possibly can, and searched > > the newsgroups, and haven't yet found a solution to my problem. > > > I'm creating a contact form which doesn't use any databases. As t

Re: Validation issues for Contact form (doesn't use database)

2010-03-16 Thread John Andersen
uson wrote: > > > > Hi, > > > > I've poured over all the documentation I possibly can, and searched > > > the newsgroups, and haven't yet found a solution to my problem. > > > > I'm creating a contact form which doesn't use any dat

Re: Validation issues for Contact form (doesn't use database)

2010-03-16 Thread John Andersen
, I don't get any of the nice > automatic validation. > > Here are my files: > > Contact Model:http://bin.cakephp.org/view/568757600 > Contacts Controller:http://bin.cakephp.org/view/1939947381 > /views/contact/index.ctp (main form):http://bin.cakephp.org/view/ > 526960429

Validation issues for Contact form (doesn't use database)

2010-03-16 Thread Johnny Ferguson
Hi, I've poured over all the documentation I possibly can, and searched the newsgroups, and haven't yet found a solution to my problem. I'm creating a contact form which doesn't use any databases. As the controller action never calls save(), I don't get any of the

Re: Data Validation not working

2010-03-16 Thread sooraj francis
actually you havent set the display option to show error in your view file isFieldError('Inventory.make')) e($form->error('Inventory.make', null, array('class' => 'message'))); hope this solves your problem Check out the new CakePHP Questions site http://cakeqs.org and help others with their C

Re: Data Validation not working

2010-03-15 Thread Dr. Loboto
Check model filename - it should be lowercased. If your model is not loaded you'll note absence of validation rules. On Mar 16, 7:57 am, SeeVik wrote: > Hello there Lucca > > I double checked the server database. Its the same as local database. > Since I am doing this applicatio

Re: Data Validation not working

2010-03-15 Thread SeeVik
Mordente wrote: > Probably there is an error at database level. Make sure your server > table structure and constraints are the same of your local machine. > > On 15 mar, 01:20, SeeVik wrote: > > > > > Hello all > > > I am using CakePHP 1.2 and I am trying to impleme

Re: Data Validation not working

2010-03-15 Thread Lucca Mordente
Probably there is an error at database level. Make sure your server table structure and constraints are the same of your local machine. On 15 mar, 01:20, SeeVik wrote: > Hello all > > I am using CakePHP 1.2 and I am trying to implement a simple form data > validation. The thing is t

Data Validation not working

2010-03-14 Thread SeeVik
Hello all I am using CakePHP 1.2 and I am trying to implement a simple form data validation. The thing is that the data validation works on my local machine but it doesn't work on my rental server (Linux FreeBSD server). Here's my model array( 'rule

Re: Data Validation Errors not displaying!!!

2010-03-11 Thread euromark
ed. So what's the new way of doing > > > it? > > > > Thanks and Regards > > > ShiVik > > > > On Mar 11, 8:32 pm, euromark wrote: > > > > > always use $form->input() > > > > this will make a lot for u automatically >

Re: Data Validation Errors not displaying!!!

2010-03-11 Thread SeeVik
at > > in cakephp 1.2 it has been deprecated. So what's the new way of doing > > it? > > > Thanks and Regards > > ShiVik > > > On Mar 11, 8:32 pm, euromark wrote: > > > > always use $form->input() > > > this will make a lot for u autom

Re: Data Validation Errors not displaying!!!

2010-03-11 Thread nurvzy
lly > > > On 11 Mrz., 11:19, SeeVik wrote: > > > > Hello all > > > > I am using cakephp 1.2 and I am having problem in displaying the error > > > messages for the data validation of a form. I created the form like > > > this > > > &g

Re: Data Validation Errors not displaying!!!

2010-03-11 Thread SeeVik
e: > > > > > Hello all > > > I am using cakephp 1.2 and I am having problem in displaying the error > > messages for the data validation of a form. I created the form like > > this > > > create( 'Posts', array( 'action' => '

Re: Data Validation Errors not displaying!!!

2010-03-11 Thread euromark
always use $form->input() this will make a lot for u automatically On 11 Mrz., 11:19, SeeVik wrote: > Hello all > > I am using cakephp 1.2 and I am having problem in displaying the error > messages for the data validation of a form. I created the form like > this > >

Data Validation Errors not displaying!!!

2010-03-11 Thread SeeVik
Hello all I am using cakephp 1.2 and I am having problem in displaying the error messages for the data validation of a form. I created the form like this create( 'Posts', array( 'action' => 'index' ) ); ?> text( 'text' ); ?> text( 'val

Re: decimal validation

2010-03-10 Thread cricket
This regexp should do it: '/^[0-9]+(\.?[0-9]+)?$/' But you should probably just use is_numeric() On Mar 10, 5:19 am, Eleazar wrote: > Hi, sorry to ask, still struggling with this... > is it possible to allow integer numbers and decimals on the decimal > validation rule? >

Re: decimal validation

2010-03-10 Thread Eleazar
Hi, sorry to ask, still struggling with this... is it possible to allow integer numbers and decimals on the decimal validation rule? thanks On Mar 8, 7:19 pm, Eleazar wrote: > Hi all, > I'm not sure if it's possible or if I have to write my own regex, but > my input data f

decimal validation

2010-03-08 Thread Eleazar
Hi all, I'm not sure if it's possible or if I have to write my own regex, but my input data fails on the decimal validation when I enter a whole value such as 100. I would like to accept integer values but also floats eg. 100, 100.0, 100.1, 100.2 etc. I couldn't see any way to do

Re: How to dynamically create validation rules

2010-03-01 Thread LunarDraco
You could also take a look at this example which shows how to have different validation based on which action was called for the controller. So you can have a validation based on the 'add' action which is completely different from the validation you might use on 'edit' or &#x

Re: custom Validation - message not shown

2010-02-28 Thread John Andersen
According to the CakePHP book, your validation code looks correct! But I am not familiar with version 1.3, so I hope that someone else can assist you :) Until then, good luck with finding the right solution, John On Feb 28, 6:56 pm, mivogt-LU wrote: > hmmm I created the view using

Re: custom Validation - message not shown

2010-02-28 Thread mivogt-LU
hmmm I created the view using the bake shell ; cake 1.3ß used to be most up-to-date ... so it is some 'original' code and as I wrote, if I use a built in validation the error message is shown On 28 Feb., 17:48, John Andersen wrote: > Hmm I don't actually see anythi

Re: custom Validation - message not shown

2010-02-28 Thread John Andersen
Hmm I don't actually see anything wrong with your validation definition and function. But I wonder about your view!! As far as the CakePHP book states, you should use the FormHelper using the $form object in the view! I have no idea whether that could be the reason, but have you tried to co

Re: custom Validation - message not shown

2010-02-28 Thread mivogt-LU
;input('AnzahlKinder'); ?> Form->end(__('Submit', true));?> so I have no idea why my message is not shown, but if i use a built in one like requiered/notempty the message is shown. Any hint so far? TIA Michael On 28 Feb., 09:20, John Andersen

Re: custom Validation - message not shown

2010-02-28 Thread John Andersen
wrote: > [cake 1.3ß | XAMPP 1.7.3|PHP 5.3.1|MySQL 5.1.41 | Win XP SP3] > > Hi everybody, > > I just has a little problem with my error-message in a custom > validation function. > If I use the built in functions like required the message is shown so > css and div seem to

custom Validation - message not shown

2010-02-27 Thread mivogt-LU
[cake 1.3ß | XAMPP 1.7.3|PHP 5.3.1|MySQL 5.1.41 | Win XP SP3] Hi everybody, I just has a little problem with my error-message in a custom validation function. If I use the built in functions like required the message is shown so css and div seem to be ok If I use my own function there is a red

Re: How to dynamically create validation rules

2010-02-27 Thread WebRenovator
You could also setup up the framework of your validation rule in the model itself. Then you can update the details in the controller as Alan suggested. This could help in making sure the rule will fail by default just in case your api doesn't actually change the rule accordingly. Also, tha

RE: How to dynamically create validation rules

2010-02-26 Thread alan
#x27;message'=>"Allowed range for bid is {$this->MyModel->minimum_bid} - {$this->MyModel->maximum_bid}");if ($this->MyModel->save($this->data)) {...}so the save function still runs the validate and I set the minimum and maximum bid during the beforeFilterHope thi

How to dynamically create validation rules

2010-02-26 Thread Kyle Decot
I am creating an API for my website and I want to create validation rules for my various methods based on some rows in my api_arguments table. How should I go about doing this? Thanks for any help. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP

Re: Need help with custom validation please

2010-02-24 Thread WebbedIT
All too often guilty of the same myself :o) Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@g

Re: How do I add custom validation in controller?

2010-02-24 Thread WebbedIT
You can add validation rules to your models for fields which do not exist in the table, think of the common password confirm field when registering a user. Validation requires those fields to pass whatever rules you set, but save ignores them. Much cleaner to process your validation with one

Re: How do I add custom validation in controller?

2010-02-23 Thread Nico
e.preventDefault(); myAjaxSettings.url = $("#MyForm").attr('action'); myAjaxSettings.data = $("#MyForm").serialize(); $.ajax(myAjaxSettings); }); }); Then in the controller do your validation as such: Configure::write('debug','0'); $this->autoRende

Re: How do I add custom validation in controller?

2010-02-23 Thread anl hp
please don't!! don't check that within the controller and don't even think about check it with javascript!! :'( use Model's custom validation, these don't need fields to be a field of your database, within a custom validation function you can just check if you have

Re: How do I add custom validation in controller?

2010-02-23 Thread Jeremy Burns
Check for their presence/value in the controller, and then unset them from the array before saving. Jeremy Burns jeremybu...@me.com On 23 Feb 2010, at 12:16, Zac Tolley wrote: > Ah but, the thing is I'm verifying fields that are not part of the > model, I'm simply verifying that they agree to

Re: How do I add custom validation in controller?

2010-02-23 Thread Zac Tolley
Though that said, thats what you are saying :) and but the terms thing..? I might just cheat and put in some JS to check that they agree to the terms Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because

Re: How do I add custom validation in controller?

2010-02-23 Thread Zac Tolley
Ah but, the thing is I'm verifying fields that are not part of the model, I'm simply verifying that they agree to some terms and that the 2 passwords they entered match Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received t

Re: How do I add custom validation in controller?

2010-02-23 Thread jodator
7; => true, 'message' => 'Musisz zaakceptować regulamin', 'on' => 'create', ), ), ); ps.: (there is no accept_terms in my database table of course. and add to it custom validation rules (links in WebbedIT post)

Re: How do I add custom validation in controller?

2010-02-23 Thread WebbedIT
You may want to have a good read of the existing core rules to make sure they can't do what you're after: http://book.cakephp.org/view/134/Core-Validation-Rules And then read the page about custom rules: http://book.cakephp.org/view/150/Custom-Validation-Rules HTH Paul Check o

Re: How do I add custom validation in controller?

2010-02-23 Thread anl hp
of course you can!...and you should! ;) CakePHP Models let you spice them with custom validations, when in a validation array you say 'rule' => array() the first parameter of the array can be the name of a custom validation function in your model, then, when validation is fired up

How do I add custom validation in controller?

2010-02-23 Thread Zac Tolley
I have created a form with the html and form helpers and setup validation rules in my model and this seems to work pretty well (anyone got this integrated with jquery?) I have a question though, in my form I have a couple of extra fields, one is a checkbox to accept terms and conditions, and

Re: Need help with custom validation please

2010-02-23 Thread Jeremy Burns
Good spot Paul - I replied too quickly! Jeremy Burns jeremybu...@me.com On 23 Feb 2010, at 09:21, WebbedIT wrote: > Your data should have been available at: > > $this->data['BookingPosition']['amountofadult'] > > not > > $this->data['booking_positions']['amountofadult'] > > Just clarifying th

Re: Need help with custom validation please

2010-02-23 Thread WebbedIT
Your data should have been available at: $this->data['BookingPosition']['amountofadult'] not $this->data['booking_positions']['amountofadult'] Just clarifying this in case other newbies read this post and get confused. Paul. Check out the new CakePHP Questions site http://cakeqs.org and help

Re: Need help with custom validation please

2010-02-23 Thread mivogt-LU
itions']['amountofadult'] ? > > > TNX > > > Michael > > > On 23 Feb., 09:35, Jeremy Burns wrote: > >> The data is accessible via $this->data. If you debug it you'll see the > >> shape of the array so you check values within it (someth

Re: Need help with custom validation please

2010-02-23 Thread Jeremy Burns
> TNX > > Michael > > > On 23 Feb., 09:35, Jeremy Burns wrote: >> The data is accessible via $this->data. If you debug it you'll see the shape >> of the array so you check values within it (something like >> $this->data['Model']['

Re: Need help with custom validation please

2010-02-23 Thread mivogt-LU
7;]['amountofadult'] ? TNX Michael On 23 Feb., 09:35, Jeremy Burns wrote: > The data is accessible via $this->data. If you debug it you'll see the shape > of the array so you check values within it (something like > $this->data['Model']['field']

Re: Need help with custom validation please

2010-02-23 Thread Jeremy Burns
The data is accessible via $this->data. If you debug it you'll see the shape of the array so you check values within it (something like $this->data['Model']['field']. Your custom validation function should return either true or false. If it returns false, your

Need help with custom validation please

2010-02-23 Thread mivogt-LU
hi there, I have some problems doing my first cake and adding some validation methods on my own. It would be great if someone in here might give me a good start and help me to do my first steps ... I am using 2 models linked with each other lodgings : id, roomnumber, amountofbeds

Re: validation strangeness

2010-02-22 Thread Rodrigo Junqueira
I am not sure if it's the same problem i've got, but my issue was due to not respecting naming convention. I missed model naming at plural. Once I got everything to the single, it worked. Hope it helped! On Feb 4, 1:19 am, cricket wrote: > cake_1.2.6 > > I'm thoroughly confused by what's happeni

Re: Validation error message does not show when the validation is in a different model

2010-02-18 Thread John Andersen
gt;error('credits') to $form->error('Credit.credits'); [/change] Haven't tried it, so no idea if it will work! Enjoy, John On Feb 19, 1:17 am, Cedric wrote: > Hi I am developing an application for my uni project but I am having > trouble with validation error mess

Validation error message does not show when the validation is in a different model

2010-02-18 Thread Cedric
Hi I am developing an application for my uni project but I am having trouble with validation error message doesn't show if the validation error is in a different model So where my validation is in the Credit Model but in an Administration view/controller I save to the Credit Model so my c

Validation error message does not show when the validation is in a different model

2010-02-18 Thread Cedric
Hi I am developing an application for my uni project but I am having trouble with validation error message doesn't show if the validation error is in a different model So where my validation is in the Credit Model but in an Administration view/controller I save to the Credit Model so my c

Re: Data validation doesn't work when on live server

2010-02-18 Thread Atti
I have instructed my host to upgrade the software on the server as I dont have control over it. On Feb 18, 10:36 am, jperras wrote: > 1) You're probably running CentOS on your production server. > 2) CentOS ships with broken PCRE UTF-8 libraries. > 3) A few of the validation rules

Re: Data validation doesn't work when on live server

2010-02-18 Thread Atti
$saved = false; $message = "There was a problem when saving your details to the database, Please try again"; }

Re: Data validation doesn't work when on live server

2010-02-18 Thread jperras
1) You're probably running CentOS on your production server. 2) CentOS ships with broken PCRE UTF-8 libraries. 3) A few of the validation rules in CakePHP use multibyte flags (e.g. for alphanumeric validation) Combine the above, and you get the problem you've described. Solutions:

Re: Data validation doesn't work when on live server

2010-02-17 Thread Jamal Aziz
Can you post your model and your controller action? On Feb 18, 3:43 am, Atti wrote: > Hi all, > Just a quick question, I managed to get my data validation working > perfectly on my local apache (XAMPP) web server, but as soon as I > uploaded the site to the internet the validation f

Data validation doesn't work when on live server

2010-02-17 Thread Atti
Hi all, Just a quick question, I managed to get my data validation working perfectly on my local apache (XAMPP) web server, but as soon as I uploaded the site to the internet the validation flag seems to be always true, ie, there is not validation going on, so it seems. What settings on my live

Re: Validation problem

2010-02-10 Thread Guillermo Mansilla
I would do something like this: items_controller.php function foo(){ if (!empty($this->data)) { //check if there is data sent if($this->User->field('email', array('conditions' => array('email' => $this->data['User']['email']{ //find the emai in the database

Validation problem

2010-02-09 Thread dtirer
I have a form with an 'Item' and 'email' field. It submits to an Items Controller. I want to validate both fields, however, the 'email' is technically part of a User model. So what happens is, when the form is submitted, it's supposed to search for the Item in the form. it also check if the emai

Re: validation of serialized data

2010-02-09 Thread bujanga
; >> Next, how does one validate the data and properly save and find the >> data. Here is what I am thinking (not tested). >> >> Validate the Model using a custom validation function: >> >> var $validate = array( >>         &#

Re: validation of serialized data

2010-02-09 Thread Dérico Filho
a good > usage? > > Next, how does one validate the data and properly save and find the > data. Here is what I am thinking (not tested). > > Validate the Model using a custom validation function: > > var $validate = array( >         'emails'        

Re: validation of serialized data

2010-02-08 Thread euromark
sage? > > Next, how does one validate the data and properly save and find the > data. Here is what I am thinking (not tested). > > Validate the Model using a custom validation function: > > var $validate = array( >         'emails'        => array( >      

validation of serialized data

2010-02-08 Thread bujanga
data. Here is what I am thinking (not tested). Validate the Model using a custom validation function: var $validate = array( 'emails'=> array( 'is_email' => array( 'rule' => array('g_

Re: validation strangeness

2010-02-03 Thread cricket
nd that the shape of the array is not what is expected. > > Jeremy Burns > > On 4 Feb 2010, at 04:25, cricket wrote: > > > Oops. I messed up the call to validate(). But, when I do ... > > > if ($this->User->create($this->data) && $this->User->v

Re: validation strangeness

2010-02-03 Thread Jeremy Burns
create($this->data) && $this->User->validates()) > { > if ($this->User->save($this->data, true)) > { > > ... validation passes! It should fail. WTF? > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with the

Re: validation strangeness

2010-02-03 Thread cricket
Oops. I messed up the call to validate(). But, when I do ... if ($this->User->create($this->data) && $this->User->validates()) { if ($this->User->save($this->data, true)) { ... validation passes! It should fail. WTF? Check out the new CakePHP Ques

validation strangeness

2010-02-03 Thread cricket
cake_1.2.6 I'm thoroughly confused by what's happening (or not happening) with my validation. For one thing, save() does not appear to be calling validate(). Even when I pass true as the 2nd param, validation does not occur. Secondly, the validation, when called explicitly, seems t

Re: Bypassing validation

2010-02-03 Thread Craig Francis
the save() method. whitelist as $cField) { if (!isset($this->validate[$cField])) { //--

Re: tree behaviour and validation rule problem

2010-02-02 Thread emmexx
d = 1234 before $this->Category->save () because I presumed that find('first') would have the same effect with the ActiveRecord approach. But I could be totally wrong on this. And because, before adding the isUnique validation rule, my "save" function did work. Anyway, I just

Re: tree behaviour and validation rule problem

2010-02-02 Thread John Andersen
_id is not empty myfield_id must be blank (children) > > So I wrote a isUnique validation rule for myfield_id. And it seems to > works if I use the baked add and edit pages. > > Then I created another page that uses a javascript widget (tafelTree) > to show the tree and to drag

tree behaviour and validation rule problem

2010-02-02 Thread emmexx
I wrote a simple model that acts as a tree behaviour. The model has a myfield_id field that must follow these rules: - if parent_id is empty (root) myfield_id can't be blank - if parent_id is not empty myfield_id must be blank (children) So I wrote a isUnique validation rule for myfield_id

Re: Bypassing validation

2010-01-30 Thread Craig Francis
Thanks John, It does strike me as a little odd that "'required' => true" is at the individual rule(s) specific level, and not the field specific level... as in: var $validate = array( 'username' => array( 'required' => true, <-- SHOULD BE HE

Re: Bypassing validation

2010-01-30 Thread John Andersen
rd']); rest of code, where you do your update. [/code] The above turns off the two validation rules for username and password so that you can save/update the other fields. Enjoy, John On Jan 29, 7:27 pm, Craig Francis wrote: > (Note: This is my first time using CakePHP). >

Bypassing validation

2010-01-29 Thread Craig Francis
(Note: This is my first time using CakePHP). I have a fairly simple user model, with validation along the lines of: var $validate = array( 'username' => array( 'notEmpty' => array(

getparentnode and custom validation rule problem

2010-01-29 Thread emmexx
I wrote a model that act as a tree (mymodel). In mymodel.php file I coded some custom validation rule. One of the rules is like the following: function testmyfield($check) { $grandfather = $this->getparentnode($this->data['Category'] ['parent_id']); if ($grandfat

Difference between Model Validation and manually setting error option in a form element

2010-01-28 Thread Imrael
I noticed a strange behaviour today. I tried to enter some manual validation into a form. This worked fine, except that the error message was printed out before the input element: Please select or enter a Journal [...] When I use the Model Validation, the Error Message is appended after the

Re: E-mail address validation problem + patch

2010-01-27 Thread BrendonKoz
ixes this particular problem, consider applying it. > > -- > Veres-Szentkirályi András > >  0001-Fixing-the-e-mail-validation-regexp-foo.-bar.com.patch > < 1KViewDownload Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP relate

E-mail address validation problem + patch

2010-01-27 Thread Veres-Szentkiralyi Andras
om/group/cake-php?hl=en From 52c9e17a1ef837b6c850c7f61edc7ed37604692c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A1s=20Veres-Szentkir=C3=A1lyi?= Date: Wed, 27 Jan 2010 05:02:27 +0100 Subject: [PATCH] Fixing the e-mail validation regexp (f...@bar.com) --- cake/libs/validation.php |2 +- 1 files changed,

Re: validation - I didn't set "VALID_NOT_EMPTY" but it become required field

2010-01-20 Thread leafchild
Hi Akeda, Thanks! It worked!!! On Jan 20, 10:46 am, Akeda Bagus wrote: > On Thu, Jan 21, 2010 at 1:05 AM, leafchild wrote: > > In my model, > > > > var $validate = array( > >                'name'=>array( > >                        'no_empty'=>arr

Re: validation - I didn't set "VALID_NOT_EMPTY" but it become required field

2010-01-20 Thread Akeda Bagus
On Thu, Jan 21, 2010 at 1:05 AM, leafchild wrote: > In my model, > > var $validate = array( >                'name'=>array( >                        'no_empty'=>array( >                                'rule'=>VALID_NOT_EMPTY, >                          

validation - I didn't set "VALID_NOT_EMPTY" but it become required field

2010-01-20 Thread leafchild
In my model, var $validate = array( 'name'=>array( 'no_empty'=>array( 'rule'=>VALID_NOT_EMPTY, 'message'=>'Please enter your name'

Re: Validation with 'on' key is not working in CakePHP 1.2.5?

2010-01-19 Thread BrendonKoz
I've been meaning to add an enhancement request to this property, but as it stands right now, you must use the appropriate value for the 'on' property. According to the Cookbook, you MUST use 'create' or 'update' as the values passed to the 'on'

Validation with 'on' key is not working in CakePHP 1.2.5?

2010-01-14 Thread Arnold
'rule' => array('checkUnique', 'original_domain'), 'on'=>'create', 'message' => 'The original domain field already exists.' )

jquery validation plugin and isUnique

2010-01-12 Thread assaggaf
I am currently, using jquery validation plugin and I need it to check the email fieled if is it unique or not... using AJAX check that's all Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because yo

validation with Ajax

2010-01-10 Thread Lorenzo Bettini
Hi I'd like that validation to be made "on-the-fly", after a field is left, and before submitting the form, i.e., using ajax. I found this article http://bakery.cakephp.org/articles/view/ajax-validation-component but it looks pretty old, does it still work? Any other sug

Re: Localization for Model validation messages

2009-12-27 Thread euromark
e: > > > > I can't agree, as I prefer to have the model be concerned with model > > > things (data, retrieval, saving, validation, etc.), and the view > > > concerned with presenting the data and the related error messages, > > > including the localization!

Re: Localization for Model validation messages

2009-12-27 Thread Walther
t agree, as I prefer to have the model be concerned with model > > things (data, retrieval, saving, validation, etc.), and the view > > concerned with presenting the data and the related error messages, > > including the localization! > > > Usually I only have one form in whic

Re: Localization for Model validation messages

2009-12-26 Thread si-mon
Thanks John. Thanks Euromark. Really helpful... On Dec 25, 9:55 pm, John Andersen wrote: > I can't agree, as I prefer to have the model be concerned with model > things (data, retrieval, saving, validation, etc.), and the view > concerned with presenting the data and the related

Can do conditional validation by credit card type except for VISA

2009-12-25 Thread spheroid
I'm trying to put conditional validation in my form that validates a correct CC is used depending on what CC was selected. Using the code found at http://bakery.cakephp.org/articles/view/conditinalvalidation-behavior. Seems to work for MC and Discover but not when I select VISA. If I select

Re: Localization for Model validation messages

2009-12-25 Thread John Andersen
I can't agree, as I prefer to have the model be concerned with model things (data, retrieval, saving, validation, etc.), and the view concerned with presenting the data and the related error messages, including the localization! Usually I only have one form in which data for a specific mod

Re: Localization for Model validation messages

2009-12-25 Thread euromark
x27;error' => array('users_email_rule' => __ > ('users_email_rule',true) ) >    ) > ) ; > > Observe the 'error' option! Here I use it to convert the validation > message into the language that the user is viewing the form. > > Enjoy, >    John >

Re: Localization for Model validation messages

2009-12-25 Thread John Andersen
'error' => array('users_email_rule' => __ ('users_email_rule',true) ) ) ) ; Observe the 'error' option! Here I use it to convert the validation message into the language that the user is viewing the form. Enjoy, John On Dec 24, 7:39 pm, si-mon wrote: > Hi All, &g

Re: Localization for Model validation messages

2009-12-24 Thread euromark
$this->validationErrors[$field] = __($value, true); } } i even added an array functionality to use message = array('at least % chars', 255) etc On 24 Dez., 18:39, si-mon wrote: > Hi All, > > Is there a way to use localization for validation messages in t

Localization for Model validation messages

2009-12-24 Thread si-mon
Hi All, Is there a way to use localization for validation messages in the Model $validate array? eg: $validate = array ( 'name' => array('rule'=>'notEmpty', 'message'=>'Name is mandatory' )); I need the message 'Name is mandato

Re: Validation problem wtih "required" flag set

2009-12-23 Thread Dr. Loboto
When cake validates fields it first checks for field existence in data array. If there is no such key, with required=true cake invalidate it, with required=false cake skip it. So this flag behave exactly as it is named. If field is required it must be present in data array. On Dec 24, 1:21 am, Phi

<    5   6   7   8   9   10   11   12   13   14   >