Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Optional Filefield

$
0
0
hi, i have a table assignment contains the following field
id, studentID, behaviorID, uploadFile

uploadFile is a file type

assignment model:
rules: array('uploadFile', 'file', 'types'=>'docx, doc, pdf'),


in the create option, in _form
i put the fields: id, studentiD and behaviorID without the uploadFile

when i press create button, an error appears that the field uploadFile cannot be blank

in the database, i put the field uploadFile Null= true, and in the rules there is nothing indicates that it must be required. so i dont understand why this message still appears and the action creation doesnt happens?

can anyone help me?

thank you

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>