Skip to content

Instantly share code, notes, and snippets.

@SebaM90
SebaM90 / get-form-validation-errors.ts
Last active November 6, 2021 08:33 — forked from JohannesHoppe/get-form-validation-errors.ts
Get all validation errors for Angular FormGroup
import { FormGroup, ValidationErrors } from '@angular/forms';
export function getFormValidationErrors(form: FormGroup): Array<any> {
const result: Array<any> = [];
Object.keys(form.controls).forEach((key) => {
const controlErrors: (ValidationErrors|null|undefined) = form.get(key)?.errors;
if (controlErrors) {
Object.keys(controlErrors).forEach((keyError) => {
result.push({
control: key,
git log --all --graph --pretty=format:"%C(yellow)%h%Creset%C(cyan)%C(bold)%d%Creset %C(cyan)(%cr)%Creset %C(green)%cn%Creset %s"
@SebaM90
SebaM90 / hyper.js
Created June 4, 2020 20:10
Config for Hyper Terminal
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 16,
// font family with optional fallbacks
fontFamily: 'JetBrains Mono, Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace',
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
cursorColor: 'rgba(248,28,229,0.8)',