Does Pebble have a function to make at least one attribute have to be fill

Viewed 22

i need to create a transformation request with peeble , and i have to send all my attributs as optional , but at least one of them have to filled in the request.

the first code is like :

{% if personne is not empty %}

    {% if personne.nom is not empty %}
      <nom>{{ personne.nom }}</nom>
    {% endif %}

    {% if personne.prenom is not empty %}
       <prenom>{{ personne.prenom }}</prenom>
    {% endif %}

{% endif %}

In my real code , i have at least a 100 attributs.

0 Answers
Related