Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload Validators #92

Closed

Conversation

jamiejackson
Copy link
Contributor

@jamiejackson jamiejackson commented May 25, 2016

I don't know VT (or jQuery validator) all that well, but here's my stab at upload validators.

The gist of my ClientRuleScripter_X.cfc changes were to get generated rules to go from this (broken) format:

    fm['attach_2'] = $(":input[name='attach_2']", $form_frmMain);
    if (fm['attach_2'].length) {
        fm['attach_2'].rules('add', {
             "extension" : 
            {
                "extension" : "pdf"
            },
            "messages" : {
                "extension" : "The defaultMessage_extension"
            }
        });
    }

...to this (working) format:

    fm['attach_2'] = $(":input[name='attach_2']", $form_frmMain);
    if (fm['attach_2'].length) {
        fm['attach_2'].rules('add', {
            "extension" : "pdf",
            "messages" : {
                "extension" : "The defaultMessage_extension"
            }
        });
    }

I don't have automated tests for these, nor did I run regression tests. If you require that, you'll need to let me know what the setup and steps are for that.

I also didn't add any documentation (not sure where that lives now).

Further, I didn't commit samples; however, locally, I've been working in StructureDemo, since that didn't require me to learn the model/BO aspects (yet), and it was one of the samples I was able to get running. If you would like me to commit a sample, please let me know which one is best.

Finally, this has some CFML-engine-based logic branching, and while I've taken a crack at providing Adobe functionality, I've only really tested on Lucee 4.5.2.018.

@jamiejackson
Copy link
Contributor Author

Hang on, I need to test something.

@jamiejackson
Copy link
Contributor Author

Okay, done.

@jamiejackson
Copy link
Contributor Author

Doing some testing on ACF 10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant