Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Bricolage: users

Required fields / minimum length

 

 

Bricolage users RSS feed   Index | Next | Previous | View Threaded


catalyst at mikeraynham

May 15, 2011, 10:14 AM

Post #1 of 5 (668 views)
Permalink
Required fields / minimum length

Hi,

Is it possible to make a field required and and set a minimum length?

I've created an Image element type, and added an Alt field (for alt
text). I would like to ensure that the user is forced to enter a value
in this field. Setting a value for Minimum Occurrence ensures that the
field is displayed in the GUI, but that field can still be left blank.

I can possibly throw an error from the template, but that seems a little
messy. How do others solve this?


Regards,

Mike


bret at pectopah

May 15, 2011, 12:50 PM

Post #2 of 5 (615 views)
Permalink
Re: Required fields / minimum length [In reply to]

Hi Mike,

I'm afraid throwing the error from the template is how it's done.

You can pre-populate the field by typing a value in it in the element
type manager. Maybe something like "REPLACE ME WITH REAL ALT TEXT!"



Hope this helps,

Bret


On Sun, 2011-05-15 at 18:14 +0100, Mike Raynham wrote:
> Hi,
>
> Is it possible to make a field required and and set a minimum length?
>
> I've created an Image element type, and added an Alt field (for alt
> text). I would like to ensure that the user is forced to enter a value
> in this field. Setting a value for Minimum Occurrence ensures that the
> field is displayed in the GUI, but that field can still be left blank.
>
> I can possibly throw an error from the template, but that seems a little
> messy. How do others solve this?
>
>
> Regards,
>
> Mike
>

--
Bret Dawson
Producer
Pectopah Productions Inc.
(416) 895-7635
bret [at] pectopah
www.pectopah.com


catalyst at mikeraynham

May 15, 2011, 1:00 PM

Post #3 of 5 (621 views)
Permalink
Re: Required fields / minimum length [In reply to]

Hi Bret,

After posting my question, I thought about it some more, and realised
that this brings up the whole area of user input validation. Required
fields are just the start of what can be a big and complex task, so I
guess leaving it out of the GUI is a sensible idea.


Thanks for your help.


Regards,

Mike


On 15/05/11 20:50, Bret Dawson wrote:
> Hi Mike,
>
> I'm afraid throwing the error from the template is how it's done.
>
> You can pre-populate the field by typing a value in it in the element
> type manager. Maybe something like "REPLACE ME WITH REAL ALT TEXT!"
>
>
>
> Hope this helps,
>
> Bret


ps at phillipadsmith

May 17, 2011, 6:08 AM

Post #4 of 5 (610 views)
Permalink
Re: Required fields / minimum length [In reply to]

On 2011-05-15, at 4:00 PM, Mike Raynham wrote:

> Required fields are just the start of what can be a big and complex task, so I guess leaving it out of the GUI is a sensible idea.

That said, I have wanted to propose the ability to specify input validation on field-level elements for a long time (as well as help text for the field). I think it makes total sense to validate before a save or a preview.

--
Phillip Smith
http://phillipadsmith.com
http://twitter.com/phillipadsmith
http://linkedin.com/in/phillipadsmith


david at kineticode

May 17, 2011, 9:18 AM

Post #5 of 5 (612 views)
Permalink
Re: Required fields / minimum length [In reply to]

On May 17, 2011, at 6:08 AM, Phillip Smith wrote:

>> Required fields are just the start of what can be a big and complex task, so I guess leaving it out of the GUI is a sensible idea.
>
> That said, I have wanted to propose the ability to specify input validation on field-level elements for a long time (as well as help text for the field). I think it makes total sense to validate before a save or a preview.

+1

I'm sure we could add quite a few simple validators, and make it pluggable.

David

Bricolage users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.