• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1694
  • Last Modified:

Spry validation with file fields

I understand how to use Spry in DW to validate text fields, checkboxes, radios and so fourth but how do you validate a file field with the same validating features (CSS Styles)? I try just using a textfield and then change it to a file field but Spry gets confused.

<script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<span id="sprytextfield2">
            <input type="file" name="company_logo" id="company_logo" />
            <span class="textfieldRequiredMsg">A value is required.</span></span>
<script type="text/javascript">
var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2", "none", {validateOn:["blur"]});

Open in new window

1 Solution
How can you give a span ID for validation, it should be the file element's name "company_logo"
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Train for your Pen Testing Engineer Certification

Enroll today in this bundle of courses to gain experience in the logistics of pen testing, Linux fundamentals, vulnerability assessments, detecting live systems, and more! This series, valued at $3,000, is free for Premium members, Team Accounts, and Qualified Experts.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now