All regex are in Javascript syntax.
- URL validation:
(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)
/* ------- OptionsDropdown ------- */ | |
.optionsDropdownScrollArea { | |
margin-right: calc(var(--_combobox-padding) * -1); | |
@mixin rtl { | |
margin-left: calc(var(--_combobox-padding) * -1); | |
margin-right: 0; | |
} | |
} |
import classes from './Select.module.css'; | |
import { ReactNode, memo } from 'react'; | |
import clsx from 'clsx'; | |
import _ from '@lodash'; | |
import { isOptionGroup } from './utils'; | |
import { CheckIcon, Combobox, ScrollArea } from '@mantine/core'; | |
import type { ParsedOption, ParsedOptionGroup } from '../types'; | |
interface OptionProps<T extends object> { | |
data: ParsedOption<T> | ParsedOptionGroup<T>; |
import __ from 'lodash'; | |
/** | |
* You can extend Lodash with mixins | |
* And use it as below | |
* import _ from '@lodash' | |
* | |
* copy the file and remove functions that not needed | |
*/ | |
const _ = __.runInContext(); |
All regex are in Javascript syntax.
(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)
#!/bin/bash | |
# get current tag | |
curr=`git describe --tags --abbrev=0` || curr="" | |
newTag="" | |
# check if tag exists | |
if [ -n "$curr" ] | |
then | |
# got latest tag |
Thanks to the friendly and detailed advice of @LB from Wagtail community (https://wagtail.io/slack/)
views.py
class FormSubmissionViewSet(mixins.CreateModelMixin, viewsets.GenericViewSet):
"""
A viewset for viewing and editing contact form submissions.
"""
serializer_class = FormSubmissionSerializer