developer.jelix.org is not used any more and exists only for history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Opened 12 years ago

Closed 12 years ago

#556 closed enhancement (fixed)

Minlength and Maxlength

Reported by: mike Owned by: laurentj
Priority: normal Milestone: Jelix 1.1 beta 1
Component: jelix:forms Version: 1.0.3
Severity: minor Keywords:
Cc: Blocked By:
Blocking: Documentation needed: no
Hosting Provider: Php version:

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 (4)

patch_minmaxlength_556.diff (8.0 KB) - added by mike 12 years ago.
Le patch avec tests unitaires
patch_minmaxlength_556_v2.diff (6.0 KB) - added by mike 12 years ago.
Le patch mis à jour pour la révision 1008
patch_minmaxlength_556_v2.1.diff (6.0 KB) - added by mike 12 years ago.
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 12 years ago.
Patch V2. Cette fois c'est la bonne .…

Download all attachments as: .zip

Change History (13)

comment:1 Changed 12 years ago by laurentj

Well, propose your patch :-)

Changed 12 years ago by mike

Le patch avec tests unitaires

comment:2 Changed 12 years ago by mike

  • review set to review?

comment:3 Changed 12 years ago 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).

comment:4 Changed 12 years ago 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 ?

comment:5 Changed 12 years ago 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 ;)

Changed 12 years ago by mike

Le patch mis à jour pour la révision 1008

comment:6 Changed 12 years ago by mike

  • review changed from review- to review?

Changed 12 years ago by mike

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

Changed 12 years ago by mike

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

comment:7 Changed 12 years ago by laurentj

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

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.

comment:8 Changed 12 years ago by laurentj

  • Owner set to laurentj
  • Status changed from new to assigned

I take it

comment:9 Changed 12 years ago by laurentj

  • Resolution set to fixed
  • review review- deleted
  • Status changed from assigned to closed

This patch is very too old. I had to add other modifications. Changes now have been made in the trunk. However, thanks for your contribution.

Note: See TracTickets for help on using tickets.