Closed (fixed)
Project:
Relation
Version:
7.x-1.x-dev
Component:
API
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Mar 2013 at 18:59 UTC
Updated:
1 Jun 2014 at 10:23 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
mikran commentedrelation_ui_type_form_validate() function added.
Comment #2
naught101 commentedThis will also needs some test like the ones I'm proposing in #1345648: relation_save does not properly validate $type parameter, but maybe they can be added over there, since that's an API issue.
I wonder if it might not be sensible to also add a check to make sure that max_arity<=2 when directional is selected? See my latest comment on #1259738: n->m relations (mutant squids)
Comment #3
naught101 commentedUse full words, and correct grammar.
Also, since we're on type validation, can we make the source bundles required, and the reverse label and target label required for directional? Included in patch.
Comment #4
dpiTagging for forward port
Comment #5
steveoliver commentedThis looks good. Only thing I see:
I don't think we need to document #states here with these two comments:
// action to takeComment #6
naught101 commentedIn that case, we probably should do this :)
Comment #7
naught101 commentedI'd apply this, but I'm wondering if there was a reason these form items weren't marked requred to start with (especially source_bundles - how would that work?)
Comment #8
steveoliver commentednaught101: there we go.
re: required: Maybe leave that for another issue and get this patch in, since we're certain it makes sense?
Comment #9
naught101 commentedThanks, commited: 8f3251c
Comment #10
dpiComment #11
mikran commentedOne more spelling error for 7.x
Comment #12
mikran commentedpatch for 8.x
Comment #13
mikran commentedtesting how badly tests are broken
Comment #14
loziju commentedThe validation doesn't seem to work for unlimited arity. I suppose unlimited = 0 and it can only be selected at the maximum arity field. Thus min = 1, max = 0 and it fails validation?
Comment #15
mikran commentedComment #16
mikran commentedThis has been fixed and committed for 8.x. The infinite arity issue remains for 7.x, here is the code from 8.x commit:
Comment #17
mikran commentedComment #18
mikran commented