wiki:TracTicketValidatorPlugin

Validate ticket fields

Notice: This plugin is unmaintained and available for adoption.

Description

This plugin allows you to perform validations on form input fields in your Trac pages.

Key features:

  • require the email address of an anonymous contributor and validate this email address
  • support required fields
  • match values in fields using regular expression

As an example:

  1. Validate anonymous author email address and make the comment a required input:
    [components]
    tracticketvalidator.* = enabled
    
    [ticketvalidator]
    validate_author = true
    validate_author.tip = Please enter your email address
    validates = comment, summary
    comment.rule = .+
    comment.tip = Please input comment
    summary.rule = [A-Z].*
    summary.tip = Please correct summary
    

Note: when validating more than one field, use a list after "validates =".

  1. There is a very straightward implementation of parent/child tickets: just prepend the parent ticket number to the child ticket summary. For example, if the parent ticket 234 summary is <#0>A parent ticket, then the child ticket summary will be <#234>A child ticket. We can perform a validation using regular expressions as follows:
    [components]
    tracticketvalidator.* = enabled
    
    [ticketvalidator]
    validates = summary
    summary.rule = ^<#\d*>.*
    summary.tip = Please correct summary format
    

Bugs/Feature Requests

Existing bugs and feature requests for TracTicketValidatorPlugin are here.

If you have any issues, create a new ticket.

defect

5 / 6

enhancement

6 / 6

Download

Download the zipped source from here.

Source

You can check out TracTicketValidatorPlugin from here using Subversion, or browse the source with Trac.

Installation

General instructions on installing Trac plugins can be found on the TracPlugins page.

Recent Changes

17288 by rjollos on 2018-09-17 06:04:38
TracTicketValidator 0.5: Allow empty or match

Patch by jsnell@…

Fixes #13473.

17106 by rjollos on 2018-04-07 20:50:06
TracTicketValidator 0.4: Allow name + email

Patch by lee.calabrese@….

Fixes #7022.

17105 by rjollos on 2018-04-07 20:19:25
TracTicketValidator 0.3: Avoid package namespace collision

Change package name to avoid collision with TicketValidatorPlugin.

The new component rule is:

tracticketvalidator.ticketvalidator.*

or

tracticketvalidator.*

Fixes #13406.

(more)

Author/Contributors

Author: richard
Maintainer: none (needsadoption)
Contributors:

Last modified 3 days ago Last modified on Sep 17, 2018, 6:02:49 AM