Parcourir la source

161213
Modify
common editor edit field add min length logic

Ray Zhang il y a 9 ans
Parent
commit
f50f80668d

BIN
RedAnt ERP Mobile/RedAnt ERP Mobile.xcworkspace/xcuserdata/Ray.xcuserdatad/UserInterfaceState.xcuserstate


+ 7 - 0
RedAnt ERP Mobile/common/CommonEditor/CommonEditorViewController.m

@@ -562,9 +562,16 @@
                     if( check_len_val.length<min_length)
                     {
                         self.cancommit = false;
+                        
+                        
+                        
                         NSString* mfield =[NSString stringWithFormat:@"%d. %@ is too short",fields.count+1,itemjson[@"aname"]];
                         
                         
+                        if(check_len_val.length==0 &&[[itemjson valueForKey:@"required"] isEqualToString: @"true"])
+                            mfield =[NSString stringWithFormat:@"%d. %@ is missing",fields.count+1,itemjson[@"aname"]];
+                        
+                        
                         [fields addObject:mfield];