Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8102847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:20:59+00:00 2026-06-05T23:20:59+00:00

I am defining a Form class which has a filefield and is not mandatory

  • 0

I am defining a Form class which has a filefield and is not mandatory to add a file to it…but whenever i do not provide a file the form is invalid….so is there any way by which i can make it optional for user to add a file or not???

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T23:21:00+00:00Added an answer on June 5, 2026 at 11:21 pm

    Yes, it is definitely possible, so check if you have required=False.

    Quoting from documentation for django 1.4: “By default, each Field class assumes the value is required, so if you pass an empty value — either None or the empty string (“”) — then clean() will raise a ValidationError exception:” ( https://docs.djangoproject.com/en/1.4/ref/forms/fields/#required )

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to add a property to System.Windows.Form.Control base class without defining
I'm defining a class that extends Ext.form.Panel but none of the fields appear when
Defining custom components in Facelets is easy and quick but there's one thing I
In Scala, a class's primary constructor has no explicit body, but is defined implicitly
I've created a form which has a loop to display a number of rows.
Defining a form in my Play! controller when the compiler spit out this weird
After defining the following : abstract class A { type T def print(p: T)
I have a textbox that I am defining as <%= Html.TextBox(Username, Model.Form.Username, new {
I've a form in which I want the calculate function to be called and
I'm using Ruby on Rails to populate a database from a form that has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.