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

Dp/phone number input #5

Open
wants to merge 2 commits into
base: sinaptia
Choose a base branch
from
Open

Conversation

TrabajandoIdeas
Copy link
Collaborator

@TrabajandoIdeas TrabajandoIdeas commented Dec 27, 2024

Main features:

  • Country code selector with flag
  • Only allowed characters: +, white space, - and 0-9
  • 1 input with the data, the rest of the inputs will be ignored in form submit

TODO:

  • All flags by importing a json or similar
  • Better styles
  • Allow more customisation(css classes, attributes, etc)

@@ -0,0 +1,5 @@
module Components::PhoneNumberInputHelper
def render_phone_number_input(:name, :value = "")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

esto no es ruby válido :P
:algo es un simbolo, usarlo en un def para declarar un parámetro es un error de sintaxis. debería ser:

si queres usar parametros posicionales

Suggested change
def render_phone_number_input(:name, :value = "")
def render_phone_number_input(name, value = "")

o, si quisieras usar keyword arguments:

Suggested change
def render_phone_number_input(:name, :value = "")
def render_phone_number_input(name:, value: "")

:algo = otra_cosa estaría queriendo asignar un valor a un simbolo, que ya es un valor y es inmutable. también es un error de sintaxis.

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

Successfully merging this pull request may close these issues.

2 participants