Ticket #556 (new enhancement)

Opened 4 months ago

Last modified 1 month ago

Minlength and Maxlength

Reported by: mike Assigned to:
Priority: normal Milestone: Jelix 1.1 beta 1
Component: jelix:forms Version: 1.0.3
Severity: minor Keywords:
Cc: Php version:
Review: review- Hosting Provider:
Documentation needed: 0 Blocking:

Description

Why we could'nt use theses attributes on the secret field and on the confirm. This can be very useful to do some check before using passwords.

I can provide the patch if you want.

Attachments

patch_minmaxlength_556.diff (8.0 kB) - added by mike on 04/28/08 18:58:07.
Le patch avec tests unitaires
patch_minmaxlength_556_v2.diff (6.0 kB) - added by mike on 07/11/08 18:43:30.
Le patch mis à jour pour la révision 1008
patch_minmaxlength_556_v2.1.diff (6.0 kB) - added by mike on 07/11/08 18:51:10.
Erreur sur le patch précédent. Nouveau patch mis à jour pour la révision 1008
patch_minmaxlength_556_v2.2.diff (7.1 kB) - added by mike on 07/11/08 18:55:50.
Patch V2. Cette fois c'est la bonne .…

Change History

04/23/08 17:42:12 changed by laurentj

Well, propose your patch :-)

04/28/08 18:58:07 changed by mike

  • attachment patch_minmaxlength_556.diff added.

Le patch avec tests unitaires

04/28/08 18:58:40 changed by mike

  • review set to review?.

04/30/08 23:56:45 changed by laurentj

  • review changed from review? to review-.

Your patch seems ok, except on one thing: you don't need to set maxlength/minlength properties on the generated PHP object and an the generated JS object corresponding to the confirmation field, because if it is too long or too short, it means that the secret field is also too long or too short (so we will have an error on the secret field), or it means just that the confirmation field is different from the secret field (so we will the error about this difference).

05/26/08 17:21:31 changed by bibo

I need this functionnality. Apparently, mike your patch is near to be review+ if you correct laurentj comments. Can you provide a new patch ?

07/02/08 14:52:45 changed by bballizlife

Just to ask Mike if he can provide a new patch. If not, never mind, someone else will do it.

So Mike, let us know about what to do here ;)

07/11/08 18:43:30 changed by mike

  • attachment patch_minmaxlength_556_v2.diff added.

Le patch mis à jour pour la révision 1008

07/11/08 18:43:44 changed by mike

  • review changed from review- to review?.

07/11/08 18:51:10 changed by mike

  • attachment patch_minmaxlength_556_v2.1.diff added.

Erreur sur le patch précédent. Nouveau patch mis à jour pour la révision 1008

07/11/08 18:55:50 changed by mike

  • attachment patch_minmaxlength_556_v2.2.diff added.

Patch V2. Cette fois c'est la bonne ....

07/23/08 14:18:56 changed by laurentj

  • review changed from review? to review-.
  • milestone set to Jelix 1.1 beta 1.

The code is ok for me, but the modification should be done on the 1.1 format (we don't touch anymore on the 1.0 format), and the patch should be adapted to the lastest trunk, because since revision 1008, there were big changes in jForms.

Since I review in late, this is my fault, so if you don't want to do this adaptation or if you haven't time, no worry, I will do that.

Download in other formats: Comma-delimited Text Tab-delimited Text RSS Feed