We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Validate RelationShip Field

How Do I?

Andrés Molina's avatar
Andrés Molina
43 posts
5 years ago
Andrés Molina's avatar Andrés Molina

Im have a RelationShip Field expression Engine generate a field name like this

<select name=”blogs[data][]”> <option value=”1”>Blog 1</option>

Im need validate if The selected Blog its created only by the Logged in user, because multiple users can read all entries un a relation pre-filled field

how can?

if im use build in Form rule, The validation system its broken because te field send a array, and the validation system dont read array fields.

For example

for example {exp:channel:form channel="News" rules:blogs="enum[20,21]"} return

<h1>Notice</h1>
 <h2>Array to string conversion</h2>
 ee/legacy/libraries/Form_validation.php, line 826
 <ul>
  <li><b>Severity</b>: E_NOTICE</li>
 </ul>
       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.