Code Monkey home page Code Monkey logo

Comments (4)

HuangruiChu avatar HuangruiChu commented on August 16, 2024

For "judge whether the url is valid" and "return the error" commit 1e1ab4a has solved this

from haxel-eventbrite.

HuangruiChu avatar HuangruiChu commented on August 16, 2024

@jerryhe16 Can you help with "judge whether the image is valid" with the function "isValidImageURL"
https://github.com/yale-mgt-656-fall-2023/project-starter-withered-horizon/blob/b32a32b3da389661ce802b6bf7e47b06ddab6846/event_controllers.go#L44

from haxel-eventbrite.

hanslanda458 avatar hanslanda458 commented on August 16, 2024

As a user, I should upload images for the events but i get told if my image is not valid

Acceptance Criteria for Valid URL:

  1. If a user attempts to submit an image URL, the system should validate whether the provided URL is correctly formatted.

  2. The URL should start with "http://" or "https://".

  3. The URL should contain valid characters and symbols for a web URL.

  4. If the URL is not valid, the user should be shown an error message on the form, indicating that the URL is not correctly formatted, and they should be prompted to correct it.

Acceptance Criteria for Valid Image Type:

  1. After the system confirms that the URL is valid, it should proceed to access the image file from the provided URL.

  2. The system should check the file type of the image, which can be one of the following: ".png", ".jpg", ".jpeg", ".gif", or ".gifv."

  3. If the image's file type is not one of the accepted types, the user should be shown an error message on the form, indicating that the image type is not supported, and they should be prompted to provide an image with one of the specified file types.

Acceptance Criteria for Returning the Error:

  1. If either the URL is invalid or the image file type is not supported, the system should return the user to the form without losing any previously entered data.

  2. The URL input field should still contain the previously entered URL (if valid), and the user's other form inputs (if any) should also remain intact.

  3. The system should display a clear and user-friendly error message near the URL input field, indicating the specific reason for the error (e.g., invalid URL format or unsupported image type).

  4. The error message should advise the user on how to rectify the issue, such as providing a valid URL or using an image with the accepted file types.

  5. The user should have the opportunity to make the necessary corrections and resubmit the form.

from haxel-eventbrite.

HuangruiChu avatar HuangruiChu commented on August 16, 2024

commit 2cb288a solve this issue by "judge whether the image is valid" with the function "isValidImageURL"

from haxel-eventbrite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.