Giter Site home page Giter Site logo

Comments (7)

MatthewJohn avatar MatthewJohn commented on May 20, 2024 1

Hey @jose-sky ,

Thanks for raising this :)

I'd be a little concerned with starting/ending with dash/underscore - how would this sound?

^[0-9A-Za-z][0-9a-zA-Z-_]*[0-9A-Za-z]$

So at least 2 characters of: any alpha-numeric character at beginning and end, with dashes/underscores allowed in the characters in-between?

Many thanks
Matt

from terrareg.

jose-sky avatar jose-sky commented on May 20, 2024

Okay I can see why it is, the regexp only allow a minimum of 3 characters. Same is happening for the creation of a namespace call db

if not re.match(r'^[0-9a-zA-Z][0-9a-zA-Z-_]+[0-9A-Za-z]$', name):

perhaps it would be acceptable to change it to:

if not re.match(r'^[0-9a-zA-Z-_]+[0-9A-Za-z]$', name):

from terrareg.

jose-sky avatar jose-sky commented on May 20, 2024

Actually if you don't want to allow the first character to be _ or - then it will be the opposite

if not re.match(r'^[0-9A-Za-z][0-9a-zA-Z-_]+$', name):

from terrareg.

MatthewJohn avatar MatthewJohn commented on May 20, 2024

Hey @jose-sky

Assuming you're happy with this suggestion, I've made an upstream ticket (https://gitlab.dockstudios.co.uk/pub/terrareg/-/issues/397) and a PR with the fix (https://gitlab.dockstudios.co.uk/pub/terrareg/-/merge_requests/332).

Let me know if you're happy/have any concerns with this implementation and I'll merge once you've confirmed :)

Many thanks
Matt

from terrareg.

jose-sky avatar jose-sky commented on May 20, 2024

This sounds great and cover all our use case for now 👍 Thanks

from terrareg.

MatthewJohn avatar MatthewJohn commented on May 20, 2024

Excellent - I'll merge the PR :) Apologies, I heard about the mail delivery issues - hopefully they should be sorted now :)

from terrareg.

MatthewJohn avatar MatthewJohn commented on May 20, 2024

That's now merged and released in v2.69.0 :)

from terrareg.

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.