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

Expressions crach on id containe "_" or "." #92

Closed
mmmcorpsvit opened this issue Jan 5, 2021 · 1 comment
Closed

Expressions crach on id containe "_" or "." #92

mmmcorpsvit opened this issue Jan 5, 2021 · 1 comment

Comments

@mmmcorpsvit
Copy link

Please add warning like this:

Warning! 
Id tag cannon contain "_" or "."!

i mean there

<textField id="user.First_Name" label="Enter your first name" value="super_user">    

this behavior crash expressions parser

@OndrejKunc
Copy link
Owner

I added _ as an allowed character in the identifier. The . cannot be used, because it can be used in the expressions to reference properties so there will be a conflict.
I added this log to the parser, whenever there is a prohibited character:

  developer.log(
    'Warning: Invalid identifier \'$id\' for element type $TFormElement in FormElementParser.\n'
    'Only alphanumerics characters and underscores are allowed and identifiers cannot start with a number.',
    level: 900, // 900 relates to Warning according to the package:logging
  );

It is already merged and published together with the null safety version, so I am closing it now.

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

No branches or pull requests

2 participants