45æ³ãå°æ¥ä¸»å©¦ã®nakimamaã§ãã ä»å¹´å¤§å¦é¢ãåæ¥ããæ¯åããã¾ãã èªæ ¢ã®æ¯åã§ãæ§å¸å¤§ã®å¤§å¦é¢ãåæ¥ããçãããç¥ã£ã¦ããæåãªä¼æ¥ã«å°±è·ãããã¨ãã§ãã¾ããã ããã§å°æ¥ãå®æ³°ãä¼ç¤¾ã®ä¸ã§ãã¨ãªã¼ãã³ã¼ã¹ãæ©ããã¨å®å¿ãã¦ãã¾ããã ã§ããå ¥ç¤¾ãã¦ããã®æ¯åããã®é»è©±ã®è©±ãèãã¦ã©ãã©ãä¸å®ã«ãªã£ã¦ãã¾ãã ãã®ã¾ã¾æ¯åã¯ä¼ç¤¾ã®ä¸ã§åããããããã¦ãã¾ãã®ã§ã¯ãªããã¨ã æ§å¸å¤§ã®å¤§å¦é¢ãåºã¦ããã®æ±ãã¯ãªãã®ã§ã¯ãªãããã ã£ãããã£ã¨è¯ãæ±ãããã¦ãããä¼ç¤¾ã«è»¢è·ããã»ããè¯ãã®ã§ã¯ãªããã¨ãèãã¦ãã¾ãã å ·ä½çã«ã¯ãæ¯åã¯ããããæä½ä¸å¹´ã¯ãç¾å ´ã§é«åã®äººãã¡ã«æãããªãããç¾å ´ã§çµã¿ç«ã¦ã®ä»äºãããã¨ã®ãã¨ã§ããã ã©ããã¦ã大å¦é¢ã¾ã§åºã¦ãå°éç¥èãããããæã£ã¦ããæ¯åãããã ä½å¹´ãæ©ãå ¥ç¤¾ããã ãã®é«åã®äººã¨ä¸ç·ã«ä»äºãããã ãã§ãããããã®ã«ããã®äººãã¡ã«æãã
CakePHPã§ã¯ãsaveã¡ã½ããã®éã«ããªãã¼ã·ã§ã³å¦çãèªåã§è¡ããã¾ãããsaveå¦çã¨åãé¢ãã¦ããªãã¼ã·ã§ã³ãè¡ããã¨ãã§ãã¾ãããã®ã¨ãã¯ãsaveæã¨è¥å¹²ç°ãªãå¦çä½ç³»ã«ãªãã¾ãã ããªãã¼ã·ã§ã³ãsaveããåãåºãã¦è¡ã ãã¤ã³ãã¯ã1.ã®validatesã®åã«ãã¼ã¿($this->request->data)ãdataãModelã«setããå¿ è¦ãããã¨ããã§ãã(ãè¥å¹²ç°ãªãå¦çä½ç³»ãã¨ã¯ããã®ãã¨ã§ãã)ãã®å¦çãè¡ããªãã¨validatesã¯å¸¸ã«trueãè¿ãã¾ãã validatesã¡ã½ããå ã§ãinvalidFieldsã¡ã½ãããå¼ã³åºããã¾ãããã®ã¡ã½ããã¯[Model]->validationErrorsã«ããªãã¼ã·ã§ã³ã®ã¨ã©ã¼ã¡ãã»ã¼ã¸(message)ãæ ¼ç´ãã¾ããããªãã¼ã·ã§ã³NGã®å ´åãããããã¡ãã»ã¼ã¸ã®åãåºããå¯è½ã§ãã // 1. ã¢ã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}