1b.app
Link copied -

The regular expression for checking the number of characters does not work correctly.

Good day!

Product example https://crm.tryalia.com.ua/app/product/3668/edit/?tabid=2

And the interface field looks like on screen 1

In the additional fields, it is called "Print description"

The regular expression used is provided from the request https://1b.app/ru/forum/managing-the-base-of-goods-and-services/17293-obmezhenny... texts/

Screen 2 for confirmation

Screen 3 confirmation how many characters are there in this text "PHU005 Restorative shampoo for men Phyto Uomo, 250 ml

Effective restorative shampoo based on aloe vera, ginseng and panthenol, deeply moisturizes the skin, increases elasticity, restores hydrolipidic balance. Thanks to hydrolyzed wheat proteins, it strengthens the hair and gives it shine and softness. Ideal for all skin and hair types. Composition: Aloe vera, ginseng, panthenol, hydrolyzed wheat proteins

Passed dermatological control. How to use: apply, lather and rinse. Does not contain substances harmful to health. Store in a tightly closed package at a temperature from +5C to +25C and a relative humidity of 55-70%. Avoid contact with eyes. For external use. Manufacturer: Phitopfarma srl ​​V.le. E. Ortolani 263, Roma, Italy. Country of manufacture: Italy. Supplier: Trialia LLC, 17 Nezalezhnosti Ave., Kharkiv, office 23, tel. 0577546220.

Made: June, 23 Use by: June, 26"

When saving, screen 4 gives an error

Screen 5 for an example that tried both html text and simple text field type

Why does the expression you provided not work as it says? There are less than 1100 characters, but it gives an error.

Provide the correct expression, please, or fix the regular expressions. Thank you!
Original question is available on version: ua

Answers:

/^.{1.1100}$/ius
add the ius modifiers - that should solve your problem
17.08.2023, 17:41
Original comment available on version: ua

For the text type field it helped.
Unfortunately, the problem has not disappeared for the html text.
Maybe another expression for a field of this type? Does it perceive the symbols in the code also as text symbols?
17.08.2023, 17:53
Original comment available on version: ua


tryalia wrote:
Unfortunately, the problem has not disappeared for the html text.

probably because when you insert html - it turns it into tags (you can see it by opening the text code in the editor) - so it increases the number of characters when saving

tryalia wrote:
Maybe another expression for a field of this type?

it all depends on your limit on the length of html - just change the number 1100 in the regular expression to the desired number according to your needs
17.08.2023, 17:56
Original comment available on version: ua


Please join the conversation. If you have something to say - please write a comment. You will need a mobile phone and an SMS code for identification to enter. Log in and comment