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

Add extra validations for links, trackers; and news #385

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Commits on Mar 20, 2024

  1. Add extra validations for links, trackers; and news

    - bookmarks: unique title, unique URL, force lang definition
    - news (direct to moderation): force section definition, force lang definition on links,
      different messages for max length of news title and link title
    - news (in redaction): force lang definition on links,
      different messages for max length of news title and link title
    - trackers: for category definition
    Oumph committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    d6ba4d0 View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2024

  1. validates lang selection for bookmarks and links

    As title and link are both mandatory, we set the lang mandatory too.
    
    The "xx" language code is removed from the valid list and blank is
    refused.
    
    The "xx" value was used as default value before we enable "blank" in
    form. It is not really useful now except for links and bookmarks which
    are already using this value.
    Trim committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    84db414 View commit details
    Browse the repository at this point in the history
  2. bookmarks: do not render preview and save button if bookmark is invalid

    This way, the errors is easier to see at they appear first on screen.
    Trim committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    ec79de0 View commit details
    Browse the repository at this point in the history
  3. news: validate association to section and show preview only if valid

    This shows a user friendly message instead of an exception if user
    remove the client side validation of section.
    
    The exception were thrown by the preview, so we avoid to show preview
    and submit button for invalid news.
    Trim committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    7a706af View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2552255 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    676b0ef View commit details
    Browse the repository at this point in the history
  6. fix typo while copying test from model/link

    The bookmark attribute for URL is "link" and not "url".
    Trim committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    e7dffa7 View commit details
    Browse the repository at this point in the history
  7. remove unused lang_validation for links

    The inclusion validator already does the job correctly.
    Trim committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    8a91804 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    46aeada View commit details
    Browse the repository at this point in the history