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

Attribute validation #36

Open
jazzido opened this issue Mar 10, 2014 · 2 comments
Open

Attribute validation #36

jazzido opened this issue Mar 10, 2014 · 2 comments

Comments

@jazzido
Copy link
Contributor

jazzido commented Mar 10, 2014

Something along these lines:

- name: organizacion
  label: Una organizacion
  obj: entity
  hidden: no
  attributes:
    - name: nombre
      label: Nombre
      required: true
    - name: date
      label: Date
      pattern: \d\d\d\d-\d\d-\d\d
@pudo
Copy link

pudo commented Mar 14, 2014

So the new aspect in this is required and pattern? What do you think the pros and cons of regexes vs. pre-defined types (URL, Email, ...) are?

@jazzido
Copy link
Contributor Author

jazzido commented Mar 14, 2014

Pros of regexes: I can validate whatever I need — Cons: having to look up a working email address-matching regex every time I do it :)

Cons of pre-defined types: How do I add a type? Why not just use regexes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants