Ticket #47 (new defect)

Opened 3 months ago

Last modified 3 months ago

Multiple validators in SubmitForm

Reported by: ctrochalakis Owned by: diegobz
Priority: major Milestone:
Component: Core Version:
Keywords: Cc:

Description

SubmitForm() declares validators twice:

  • In the fields declaration
  • In submit_schema

We should keep only one of these, probably submit_schema.

Change History

Changed 3 months ago by diegobz

Here we have two options:

1) Keep it in the fields declaration, so we won't break the client-side validation, because when we declare the validation as NotEmpty? for a field, it includes a 'class="required"' for that field automatically. However, for others kind of validation we will need to set up others kind of attributes in the field declaration manually. (Not sure if would work)

2) If we move the validation declaration to submit_schema, we will need to add a 'class="required"' manually for each field required (NotEmpty?).

Changed 3 months ago by ctrochalakis

Hmmm, You are right Diego, that's a problem indeed. Lets leave it that way for a few days or something, maybe a new idea will pop up!

Note: See TracTickets for help on using tickets.