Hi!
I'm struggling to understand how to use the new Validate:mjoinMinCount() validation. Reading the manual this was my best guess of how to use it but this does not validate:
->join(
Mjoin::inst( 'genres' )
->validator('genres[].id', Validate::mjoinMinCount(1))
->link( 'contacts.id', 'contacts_genres.contact_id' )
->link( 'genres.id', 'contacts_genres.genre_id' )
->order( 'genres.genre asc' )
->fields(
Field::inst( 'id' )
->validator(Validate::required())
->options( Options::inst()
->table( 'genres' )
->value( 'id' )
->label( 'genre' )
),
Field::inst( 'genre' )
)
)
Could you point me in the right direction?
Thanks!