-
Notifications
You must be signed in to change notification settings - Fork 33
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
Validations #238
base: master
Are you sure you want to change the base?
Validations #238
Conversation
…tterGallery into client+server-validations
@@ -0,0 +1,2 @@ | |||
#Place all constants here | |||
ACCEPTED_FILE_FORMATS = ["image/jpeg","image/png","image/svg+xml","image/gif"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO, this should be in config/initializers/0_glitterconfig.rb along with the rest of the application configuration options.
Done. |
@@ -42,3 +42,5 @@ | |||
elsif Rails.env.production? | |||
Glitter::Application.config.repo_dir="ENV['OPENSHIFT_DATA_DIR']/data" | |||
end | |||
|
|||
ACCEPTED_FILE_FORMATS = ["image/jpeg","image/png","image/svg+xml","image/gif"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I wasn't completely clear earlier - I meant that the list of supported formats should be part of the Glitter application config hash - Glitter::Application.config.accepted_formats = [..]
Any other changes? |
Looks good! Thanks! Just need to add some failing tests for this. If you need help with test writing, message @rohitpaulk - he can point you in the right direction. |
@sbagroy986 could you also please point me to a deployment I can try it out on? AFAIK, many of the form elements are done in a semantic way, so for example if you enter an invalid email, newer browsers will detect it and tell you. Showing another set of errors along with it might be distracting, so I'm interested in checking out how you've dealt with it :) |
@sbagroy986 could you fix the merge conflict and also, if you have a demo up somewhere for us to try out the changes, that would be very helpful! Thanks! |
could you pull from master and resolve any conflicts? |
sorry i haven't been active lately. i'll try to make the required changes over the coming weekend! |
MIME magic number file validations and Client-side form validation added