β π Do you know Jack over at Webflail? Jack helped us a lot in getting Slater off the ground. In those early days, he repeatedly emphasized the need for a community library. Well, today (finally!), we are announcing a community library! Shout out to Jack! :) With the launch, we have included JavaScript snippets from Corey Moen, Digipop, Jeff McAvoy, and yours truly. You can watch a demo of the community library here. β Or you can check it out yourself: https://slater.app/community_library. Do you have useful scripts? Add them to your personal library and send us an email. We'd love to include them. β Javascript 101: rrrrregexRegex or Regular expression is a powerful tool that allows you to search, validate, and manipulate text based on patterns. Regex is widely used in various programming languages and is particularly useful for tasks like form validation. (Before AI, using Regex was an absolute nightmare but with AI assistance, π.) In this 101, let's focus on using regex to validate a user's email address. Need to validate phone numbers, websites or LinkedIn Urls? Check out the Community Library. What are Regular Expressions? A regular expression is a sequence of characters that defines a search pattern. This pattern can be used to match, locate, or manage text. Regex is language-agnostic, meaning you can use similar patterns in JavaScript or most other languages. Let's examine a JavaScript function (also found in the community library) that uses regex to validate email addresses:
Want to know what the Regex does? I'll translate a bit to get a sense of how Regex works but we won't be exhaustive:
π€― Had enough? Use Slater AI to write your Regex. Here's how you might use this in a web form:
If you add this to a form, you can run the following tests email and see how the regex responds:
Regex is great for validating user input but it can do so much more. Maybe we can dig into another use case in a future 101. Want to test your regex, check out a playground like https://regexr.com. Keep exploring regex! It's a skill that will serve you well in the Webflow world. β Your projects, supported by SlaterThe Rive Guy is always creating cool Rive animations with Slater. Go check him out on Twitter and use one of his community library scripts.
Happy coding! π€ the Slater Team β If Slater helps you create better websites, please support the team behind it.
|
Slater resources, updates and community activity
The team behind Slater would like to wish you a Merry Christmas and a happy New Year! ππ π Get the Santa ASCII art: https://slater.app/projects/11431/pages/27608 Happy coding! π€ the Slater Team If Slater helps you create better websites, please support the team behind it. Become a Pro Slater User
Earlier this year, we built figdam.com. It is currently used by several of our clients to host files and watermark PDFs. Weβd like to bring this file hosting functionality to Slater users. With that in mind, where do you currently store files that Webflow doesnβt support? Would this feature be useful to you? What file hosting features do you need? Let us know. JS 101: File types File storage? Javascript? Let's consider all of the different file types that you could host and then retrieve and...
Hi, Just a reminder that Kendra and Mason will be hosting an EA Office Hours Zoom this Friday, the 13th (spookyβ¦) to chat about topics relating to Chapter 1: Sales for Creative Types. Sign up if you can make it, and bring your questions. Letβs get past any lingering sales ick together. Register to join us this Friday, 12/13 here. Also, if you canβt make it this week, weβre thinking about doing it again next Friday, 12/20 as well, if anyone is game? To ring in the holiday break, weβll chat...