xmartlabs / XLForm

XLForm is the most flexible and powerful iOS library to create dynamic table-view forms. Fully compatible with Swift & Obj-C.
MIT License
5.77k stars 953 forks source link

xlformOptionObject validateData #708

Open tommypeps opened 8 years ago

tommypeps commented 8 years ago

On class extend NSObject+XLFormAdditions.h the function value data check vale of object

-(id)valueData
    if ([self conformsToProtocol:@protocol(XLFormOptionObject)]){
        return [(id<XLFormOptionObject>)self formValue];
    }
    return nil;

check the value data of object XLFormOptionObject must be:

    if ([self conformsToProtocol:@protocol(XLFormOptionObject)]){
        return (id<XLFormOptionObject>)self;
    }
    return nil;

according to XLFormOptionObject equal and hash.

mats-claassen commented 8 years ago

Why not compare the formValue of the object in 'isEqual'? The valueData is also used in httpParameters and we dont want to get the object there but the formValue