Tagged: range, validation
- This topic has 4 replies, 2 voices, and was last updated 6 years, 11 months ago by
Steve.
Viewing 4 reply threads
-
AuthorPosts
-
-
February 23, 2015 at 1:34 pm #3344
izeutMemberHey,
I’m tryin to validate my fields created in metaboxes with piklist. For example, I have this field :piklist('field', array( 'type' => 'text', 'field' => 'field_nombre_billets', 'label' => 'Nombre de billets disponibles', 'description' => 'Capacité maximale 500 places', 'help' => 'Entrez le nombre de billets disponible pour ce spectacle', 'attributes' => array( 'class' => 'nombre_billets' ), 'validate' => array( array( 'type' => 'limit', 'options' => array( 'min' => 1, 'max' => 500 ) ), 'message' => 'Veuillez entrer un chiffre entre 1 et 500' ) ));Ok, I think my syntax is good. However, the validation doesn’t work. Do you know why? Am I doing something wrong?
Sorry for my english 🙂Tristan
-
February 23, 2015 at 3:45 pm #3346
SteveKeymaster@izeut– Welcome to the Piklist community!
You format is perfect… you’re just using the wrong validation function. Try replacing
limitwithrange. Here’s a list of the validation functions in Piklist and their descriptions. -
February 23, 2015 at 3:53 pm #3347
-
February 24, 2015 at 8:30 am #3351
izeutMemberOk thanks for the answer.
Yes I can help you for that if you want. -
February 24, 2015 at 10:35 am #3355
SteveKeymaster@izeut– I just sent you an invite to join our translation team. Email me at [email protected] if you have any questions. Thank you so much for your help!
-
-
AuthorPosts
Viewing 4 reply threads
- The topic ‘validation doesn't work’ is closed to new replies.