On Wed, May 16, 2007 at 06:46:57PM -0700, mla wrote:
I'm thinking Catalyst::Model should provide some sort of interface for
this.
This doesn't belong at the Catalyst core level since Catalyst is expressly
-not- opinionated about how your model is written.
If there was a consistent interface
Matt S Trout wrote:
On Wed, May 16, 2007 at 06:46:57PM -0700, mla wrote:
I'm thinking Catalyst::Model should provide some sort of interface for
this.
This doesn't belong at the Catalyst core level since Catalyst is expressly
-not- opinionated about how your model is written.
If there was a
On Thu, May 17, 2007 at 02:36:54PM -0700, mla wrote:
Matt S Trout wrote:
On Wed, May 16, 2007 at 06:46:57PM -0700, mla wrote:
I'm thinking Catalyst::Model should provide some sort of interface for
this.
This doesn't belong at the Catalyst core level since Catalyst is expressly
-not-
Chris Laco wrote:
Off Topic. Making a note for myself and DBIC::Validation
100 can be validated because we have %colinfo {size = 100}
Patterns could be covered in validation_profiles at the source
level...but maybe this would be nice as well:
{
type = 'VARCHAR',
size = 100,
--- Jason Gottshall [EMAIL PROTECTED] wrote:
Chris Laco wrote:
Off Topic. Making a note for myself and
DBIC::Validation
100 can be validated because we have %colinfo
{size = 100}
Patterns could be covered in validation_profiles
at the source
level...but maybe this would be nice as
Jason Gottshall wrote:
This gets at precisely the issue I've been wrestling with lately.
Validation constraints at all levels (db, model, controller, form, etc.)
seem to sort themselves into two general categories: field-specific
questions (Is it required/unique?, Does it match a given pattern?,
On 5/14/07, Dave Rolsky [EMAIL PROTECTED] wrote:
eval
{
$user-update( %bunch_of_stuff );
};
if ( my $e = Exception::Class-caught( 'My::App::Exception::DataValidation') )
{
# $e-errors contains multiple data validation error messages
# stuff them in the session
Perrin Harkins wrote:
On 5/14/07, Dave Rolsky [EMAIL PROTECTED] wrote:
eval
{
$user-update( %bunch_of_stuff );
};
if ( my $e = Exception::Class-caught(
'My::App::Exception::DataValidation') )
{
# $e-errors contains multiple data validation error messages
# stuff
where do you handle the validation? Only in the controller or in
both the model and controller?
Fail Early. Fail Often.
Some will say redundancy sucks. I agree, except for where validation is
concerned. If you're writing data from the web into a model, check the
data at the page level, and at
On Tue, May 15, 2007 at 11:42:52AM -0700, mla wrote:
And where do you handle the validation? Only in the controller or in
both the model and controller?
Controller only in my case. There could be extra validation in the
ORM, and of course in the database.
Could you give a short example of
On 5/15/07, mla [EMAIL PROTECTED] wrote:
And where do you handle the validation? Only in the controller or in
both the model and controller?
In the form processing code. This system has a CMS where users get to
generate forms and decide which fields will be on specific forms, so
the required
On Tue, May 15, 2007 at 02:51:18PM -0400, Christopher H. Laco wrote:
where do you handle the validation? Only in the controller or in
both the model and controller?
Fail Early. Fail Often.
Some will say redundancy sucks. I agree, except for where validation is
concerned. If you're
mla scribbled on 05/15/07 13:42:
Perrin Harkins wrote:
And where do you handle the validation? Only in the controller or in
both the model and controller?
Could you give a short example of taking an actual field from the
request parameters, validating it, and updating a row with it?
Matt S Trout wrote:
On Tue, May 15, 2007 at 02:51:18PM -0400, Christopher H. Laco wrote:
where do you handle the validation? Only in the controller or in
both the model and controller?
Fail Early. Fail Often.
Some will say redundancy sucks. I agree, except for where validation is
concerned.
mla wrote:
Matt S Trout wrote:
On Tue, May 15, 2007 at 02:51:18PM -0400, Christopher H. Laco wrote:
where do you handle the validation? Only in the controller or in
both the model and controller?
Fail Early. Fail Often.
Some will say redundancy sucks. I agree, except for where validation =
Christopher H. Laco wrote:
mla wrote:
Matt S Trout wrote:
On Tue, May 15, 2007 at 02:51:18PM -0400, Christopher H. Laco wrote:
where do you handle the validation? Only in the controller or in
both the model and controller?
Fail Early. Fail Often.
Some will say redundancy sucks. I agree,
Christopher H. Laco wrote:
Damned if you do... damned if you don't. There is no one correct answer.
So true ;-|
In terms of form validation, what do you guys think of this
interface? It uses perl to handle conditional logic/dependencies
instead of using a spec language like
On Tue, May 15, 2007 at 02:08:45PM -0700, mla wrote:
In terms of form validation, what do you guys think of this
interface? It uses perl to handle conditional logic/dependencies
instead of using a spec language like Data::FormValidator.
Might look at Rose::HTML::Objects and Form::Processor
On Tue, May 15, 2007 at 01:04:42PM -0700, mla wrote:
Okay, thanks very much for this. So in terms of the model constraints,
you will validate everything twice. Once at the controller layer (where
it leverages info from the model), and once in the model itself.
So you can interrogate the
Matt S Trout wrote:
On Tue, May 15, 2007 at 01:04:42PM -0700, mla wrote:
Okay, thanks very much for this. So in terms of the model constraints,
you will validate everything twice. Once at the controller layer (where
it leverages info from the model), and once in the model itself.
So you can
I'm studying different frameworks for a new project.
I'm very new to Catalyst and am reading through the tutorial.
In part 8, advanced CRUD, there's an example of form validation.
The approach is very similar to what I've always used
but I've been looking at Rails recently and noticed that they
mla [EMAIL PROTECTED] wrote on 05/14/2007 02:45:49 PM:
I'm studying different frameworks for a new project.
I'm very new to Catalyst and am reading through the tutorial.
In part 8, advanced CRUD, there's an example of form validation.
The approach is very similar to what I've always
[EMAIL PROTECTED] wrote:
mla [EMAIL PROTECTED] wrote on 05/14/2007 02:45:49 PM:
I'm studying different frameworks for a new project.
I'm very new to Catalyst and am reading through the tutorial.
In part 8, advanced CRUD, there's an example of form validation.
The approach is very similar to
mla wrote:
Clearly Catalyst has an opinion on how to handle the request
with Catalyst::Request. I'm sure you could override that somehow and
use your own, but it's helpful that there's a default request
interface that new developers can get up to speed quickly with.
I don't see why that can't
On Mon, 14 May 2007, mla wrote:
Anyone have validation logic in the model and are happy with it?
There are two kinds of validation here. One is model-level validation, and
yes, it's in my model code. My model throws exceptions, which I trap in
the controller and mess with to make it work
Dave Rolsky wrote:
On Mon, 14 May 2007, mla wrote:
Anyone have validation logic in the model and are happy with it?
There are two kinds of validation here. One is model-level validation,
and yes, it's in my model code. My model throws exceptions, which I trap
in the controller and mess
On Mon, 14 May 2007, mla wrote:
There are two kinds of validation here. One is model-level validation, and
yes, it's in my model code. My model throws exceptions, which I trap in the
controller and mess with to make it work for the web UI.
The controller might also do some validation, but
Dave Rolsky wrote:
On Mon, 14 May 2007, mla wrote:
Could you give an example of how you munge the exceptions into error
messages for the user?
eval
{
$user-update( %bunch_of_stuff );
};
if ( my $e = Exception::Class-caught(
'My::App::Exception::DataValidation') )
{
#
On Mon, May 14, 2007 at 04:44:41PM -0500, Dave Rolsky wrote:
On Mon, 14 May 2007, mla wrote:
Anyone have validation logic in the model and are happy with it?
There are two kinds of validation here. One is model-level validation, and
yes, it's in my model code. My model throws exceptions,
On Mon, 14 May 2007, Bill Moseley wrote:
There are two kinds of validation here. One is model-level validation, and
yes, it's in my model code. My model throws exceptions, which I trap in
the controller and mess with to make it work for the web UI.
I tend to have much less validation in the
Bill Moseley wrote:
On Mon, May 14, 2007 at 04:44:41PM -0500, Dave Rolsky wrote:
On Mon, 14 May 2007, mla wrote:
Anyone have validation logic in the model and are happy with it?
There are two kinds of validation here. One is model-level validation, and
yes, it's in my model code. My model
On Mon, May 14, 2007 at 07:42:00PM -0700, mla wrote:
Which is why I like the form validation tools to not be specific to
the web/HTML side of things. The HTML side of the forms are easy, anyway,
and often require hand-customizing. That way the same forms can be
used for more than just the
32 matches
Mail list logo