component parent
<q-form
@submit="onsubmit"
class="q-gutter-md"
style="min-width: 100% !important;margin-left: 5px !important;">
<div class="col-12 Bloc-Container-Principal">
<div class="col-12 Bloc-Container">
<BlocAgent v-model:BlocAgent ="dataPersonne"
v-model:FormColor ="DataFormColor"
v-model:ActionForm ="ActionForm"
/>
</div>
<div>
<q-btn
label="Soumettre"
color="positive"
type="submit"
/>
<div>
</div>
</q-form>
component enfant
<div class="col champ-dialog">
<span class="Libelle-Titre">Nom </span>
<q-input
dense
v-model="DataAgent.nom"
:rules="[NomNullRule]"/>
</div>
function rules
const NomNullRule = val => {
if (val === null || val === undefined) {
return 'Le nom est obligatoire.'
}
return true
}
Can you give me some advice? I can't find a solution to retrieve the different values of the rule before the sbmit. thank you